Skip to content

Instantly share code, notes, and snippets.

@ghstahl
Last active October 12, 2020 17:03
Show Gist options
  • Save ghstahl/4cbb26d715fe3b2ab80e4b6eeb402b68 to your computer and use it in GitHub Desktop.
Save ghstahl/4cbb26d715fe3b2ab80e4b6eeb402b68 to your computer and use it in GitHub Desktop.
var sessionKey = GuidN;
var identity = await base.GenerateClaimsAsync(user);
identity.AddClaim(new Claim(".sessionKey", sessionKey));
HttpContext.Session.SetString(sessionKey, sessionKey);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment