Last active
August 12, 2025 14:02
-
-
Save isdaviddong/e9644dcb95967a04cf7d0457177b8a12 to your computer and use it in GitHub Desktop.
getTokenClaims.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var JwtSecurityToken = new System.IdentityModel.Tokens.Jwt.JwtSecurityToken(token.id_token); | |
| var email = ""; | |
| //如果有email | |
| if (JwtSecurityToken.Claims.ToList().Find(c => c.Type == "email") != null) | |
| email = JwtSecurityToken.Claims.First(c => c.Type == "email").Value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hshahbsbsh