问题
so here's my situation:
I have a .NET Core 2.0 web app which using Identity and Google auth. Claims retrieved from Google login are email, first name, last name, and domain.
Here's where I run in to some trouble. I also use the Google Directory service to obtain the user's email groups. These groups are used as roles for authorization within the app which get stored as claims, thus making the Identity cookie larger.
When someone has a ton of Google Groups, the cookie actually ends up being too big and gives the user a 502.3 error on our websites. Is there any way to reduce the size of the cookie? I know the issue lies within the Google Groups getting stored as claims. Is there another way to store them using the Identity framework that doesn't effect the cookie?
来源:https://stackoverflow.com/questions/48504013/reducing-identity-cookie-size-in-net-core-2-0