I have code based on the sample https://github.com/okta/samples-aspnetcore/tree/master/okta-hosted-login. I would like to add custom claims to the ClaimsPrincipal and have them persisted in the auth cookie. Is there an event hook in the authentication process where I can do this?
I’ve seen the example using IClaimsTransformation, but that transformation happens on each request. I only want to perform the logic once when the user logs in.
I’ve seen examples using OpenId Connect where there is an OnTokenValidated
event, but I don’t see how to integrate that into this okta code.