简体   繁体   English

谷歌 OAuth2.0 刷新 access_token

[英]Google OAuth2.0 refresh access_token

I'm making a function to post to google my business automatically by using Google my business API by javascript and firebase.我正在制作 function 通过使用 Google 我的业务 API 自动发布到谷歌我的业务 javascript 和 ZBF12E15515C413AFC9DFA8 The access token is obtained by authentication using Google Sign In.访问令牌是通过使用 Google 登录进行身份验证获得的。 However, the access token has an expiration date, so I have to renew it using a refresh token.但是,访问令牌有一个到期日期,所以我必须使用刷新令牌来更新它。 Can I use the "user.refreshToken" shown in the image below as the refresh token to be used in this case?我可以使用下图中显示的“user.refreshToken”作为在这种情况下使用的刷新令牌吗? Thanks in advance.提前致谢。 Data retrieved upon sign-in登录时检索的数据

Yes, you are right.是的你是对的。 In general, the refresh token in an OAuth2.0 flow can be used to retrieve a new access token, which can then be used again to access resources.通常,OAuth2.0 流中的刷新令牌可用于检索新的访问令牌,然后可再次使用该令牌访问资源。 The refresh token normally has a much longer expiration date than the access token hence you can implement functionality like "remember me" using the refresh token.刷新令牌的到期日期通常比访问令牌长得多,因此您可以使用刷新令牌实现“记住我”等功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Oauth2.0 中使用 refresh_token 重新生成 access_token - How to re generate access_token in Oauth2.0 with refresh_token OAuth2.0使用cURL安全性请求access_token - OAuth2.0 request access_token using cURL security 使用PHP cURL获取access_token时,Google OAuth2.0返回“ invalid_request” - Google OAuth2.0 returns 'invalid_request' when getting access_token with PHP cURL 在 Oauth2.0 授权流程中,您在哪里以及如何存储您的 access_token 和 refresh_token - Where and how do you store your access_token and refresh_token in Oauth2.0 authorization flow 在Oauth2.0中刷新令牌 - Refresh token in Oauth2.0 如何撤销Oauth2.0中的访问和刷新令牌? - How to revoke the access and refresh token in Oauth2.0? 如何在salesforce中刷新OAuth 2.0中的access_token - How to refresh access_token in OAuth 2.0 in salesforce Microsoft Identity Platform (/common/oauth2/v2.0/token) 上格式无效的 oAuth2.0 access_token - oAuth2.0 access_token with invalid format on Microsoft Identity Platform (/common/oauth2/v2.0/token) PHP中的Oauth2.0服务器非常简单的实现-在POST中使用access_token - Oauth2.0 server in php very simple implementation - use access_token with POST PHP cURL在标头和POST JSON数据中发送oauth2.0 access_token - PHP cURL send oauth2.0 access_token in header and POST json data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM