Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have Google authentication enabled in an Azure App Service .NET Core application, and I am trying to generate an access token using Postman: enter image description here

An access token and an id_token get successfully generated, but when I input the access token into jwt.io, I see gibberish back: enter image description here

I am new to google auth as well as JWT in general, so my expectation may be totally invalid, but shouldn't I be able to decode the token on jwt.io?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

The access token is not a JWT. The id_token is a JWT and you should be able to decode it using jwt.io.

The difference is connected to the difference between OAuth 2.0 and OpenID Connect.

The access token is used to make additional requests to Google API: https://developers.google.com/identity/protocols/OAuth2WebServer#callinganapi

The id_token already holds the information for the authenticating user: https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...