Read access_token from logged in user
See original GitHub issueHow can I from a controller get the tokens for the authorized user? I have tried something like this but the token list is seems to be empty.
var userResult = await HttpContext.AuthenticateAsync();
var user = userResult.Principal;
var tokens = userResult.Properties.GetTokens().Select(token => new string[] { token.Name, token.Value });
Is this the correct way to get hold of the tokens?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
JWT Auth, Way to access AccessToken when you logged in
When i sucess logged in with correct user information, AccessToken and Refresh Tokens are issued. I needed a code to access to Access...
Read more >Get Access Tokens
Learn how to request Access Tokens using the Authorize endpoint when authenticating users and include the target audience and scope of access requested...
Read more >Get User info from his access_token
In your req.user example, looks like you have a token from a client credentials grant flow from your Auth0 Management API. That token...
Read more >Get access on behalf of a user - Microsoft Graph
Learn how an app obtains an access token from the Microsoft identity platform and calls Microsoft Graph on behalf of a user.
Read more >Logging in and Using an Access Token - Kii Documentation
A user will get their access token from Kii Cloud when they sign up or sign in. The access token is s string...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @guardrex
closing this issue @marcuslindblom feel free to use the docs issue for any further discussion
I’ll open an issue to take a look at this.