I created a class using IUserClaimsStore to set the claims after login:
public class TheUserStore : IUserStore<User>, IUserRoleStore<User>, IUserPasswordStore<User>, IUserClaimStore<User>
The problem is, when I have a user with multiple roles and permissions, storing my claims no longer works and there are cookies stored that produce a "request too long" error. They look like this:
Is there a way to tell c# not to store those informations in cookies or any other way to prevent this problem?
I haven't been working with c# for a long time so I'm at a loss here.
Thanks!
Ok, not sure if this is the correct answer, but I found a way to stop .net core from storing all that information in cookies. In the startup.cs I add the following line:
And then I created the AppClaimsPrinzipalFactory.cs which contains the following:
Not sure what exactly happens here but it works. Found this answer here: Recommended best practice for role claims as permissions