ExcludeTypeInfo with IAuthSession

My services have ExcludeTypeInfo set to true, but I notice this doesn’t apply when the iauthsession is stored - the __type key is still included. I’m wondering if there’s a way to exclude from here also.

(I’m trying to share auth between service layers on the same domain, and I would prefer not having the namespaces have to match between the projects).

Can you share related parts of your AppHost config for both? Eg, registration of related parts like ICacheClient, and what serialization config you are using?

Note: if you’re trying to share Auth between multiple Apps you should be sharing the exact same Type, i.e. same class + namespace.

Since it’s an interface it needs to know the concrete type it should deserialize back into. Where is the IAuthSession being stored?

I solved this issue by sharing the project with the authsession between my two servicelayers.

1 Like