How can I verify a Google authentication API access token?

前端 未结 10 508
长发绾君心
长发绾君心 2020-11-30 17:19

How can I verify a Google authentication access token?

I need to somehow query Google and ask: Is [given access token] valid for the [exampl

10条回答
  •  暖寄归人
    2020-11-30 17:55

    Ok, most answers are valid but not quite right. The idea of JWT is that you can validate the token without the need to contact the issuer everytime. You must check the id and verify the signature of the token with the known public key of the certificate google used to sign the token.

    See the next post why and how to do this.

    http://ncona.com/2015/02/consuming-a-google-id-token-from-a-server/

提交回复
热议问题