macfly
macfly

Reputation: 265

Asp.Net Core UserClaimsPrincipalFactory lost claims

I am extending UserClaimsPrincipalFactory class for generting custom claims and everything works OK. The problem is that after some time, couple hours usually, all custom claims are lost. Only user name claim is available.

What could be the reason?

Upvotes: 3

Views: 822

Answers (1)

macfly
macfly

Reputation: 265

The problem was that I have override the wrong method. I should override GenerateClaimsAsync instead of CreateAsync. Now it works.

Upvotes: 1

Related Questions