如何验证Google身份验证API刷新令牌?

时间:2019-05-21 17:32:24

标签: php api oauth google-oauth google-authentication

是否可以检查Google身份验证刷新令牌是否有效?

当前,无效令牌正在破坏我的应用程序(使用PHP客户端库),并在PHP日志中记录401未经身份验证的错误。

我已经尝试了以下general_tibble %>% mutate(n = map(nrs+1, ~ seq(.x) - 1)) %>% unnest 请求,但它们似乎不支持tokeninfo,但是与refresh_token很好地兼容。

https://www.googleapis.com/oauth2/v1/tokeninfo?refresh_token=refreshToken

https://oauth2.googleapis.com/tokeninfo?refresh_token=refreshToken

还查看了以下文档:https://developers.google.com/identity/sign-in/web/backend-auth

PHP日志中的错误:

access_token

PS!提供有效的PHP Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "domain": "global", "reason": "unauthorized" } ], "status": "UNAUTHENTICATED" } } 时没有错误。换一个字母就给我错误。

0 个答案:

没有答案