-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add the latest recommended passing tokens approach #35482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e1f1442
to
d653a02
Compare
var claimsIdentity = new ClaimsIdentity(context.Principal?.Identity, | ||
[new Claim("AccessToken", accessToken ?? "No Access Token!")]); | ||
context.Principal = new ClaimsPrincipal(claimsIdentity); | ||
context.Properties.Items.Remove("access_token"); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
if (user is not null) | ||
{ | ||
var accessToken = | ||
user.Claims.First(c => c.Type == "AccessToken")?.Value; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@halter73 ... This is a good improvement thus far. The latest updates come directly from our discussions. I'd like to go ahead and get this live now, and I'll probably perform some touch-ups to it next week. Then, I hope you'll look at the two main sections that cover this subject in the live articles within the next couple of weeks. I'll send you the live article links. WRT a CircuitHandler approach, I tried again today and ran into trouble again. I couldn't get it work. I even think that I should check our guidance at ... ... to confirm that it still works as we describe because I tried using a similar approach to that in one of my efforts and it didn't even look like that was working properly. I'll check on it soon. |
Fixes #31691
Addresses #35225
As usual, the updates are based on π¦ RexHacks!β’ π. Get ready for the code smells! π©ππ
Internal previews