谷歌不要刷新令牌会过期吗? [英] Do Google refresh tokens expire?

查看:663
本文介绍了谷歌不要刷新令牌会过期吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在仅在短时间内为测试目的使用刷新令牌几次,但我想知道的是,千万谷歌刷新令牌会过期吗?或者,我可以调用相同的刷新令牌在一个长周期(一个星期甚至几个月)一次又一次地得到另一个访问令牌?

I have used the refresh token several times in just a short period for testing purposes, but I wonder that, do Google refresh token expire? Or I can call the same refresh token to get another access token again and again in a long period(A week or even months)?

推荐答案

该谷歌验证服务器发出刷新令牌永不过期 - 这是刷新令牌的整点。
刷新令牌将过期(或者我应该说成为非法),当用户撤销访问你的应用程序。

The Google Auth server issued Refresh tokens never expire — that's the whole point of the refresh tokens. The refresh token will expire (or I should say become unauthorized) when the user revokes access to your application.

转寄此 DOC 它明确规定刷新令牌功能。

Refer this doc it clearly states the function of refresh tokens.

而不是发出一个长期持久的令牌(通常为一年或终身无限好)的,
      服务器可以发出短暂的访问令牌和一个长寿命刷新令牌。
  因此,在短期可以反复使用刷新令牌,直到谁授权访问撤销您的应用程序访问的用户。

Instead of issuing a long lasting token (typically good for a year or unlimited lifetime), the server can issues a short-lived access token and a long lived refresh token. So in short you can use refresh tokens again and again until the user who authorized the access revokes access to your application.

这篇关于谷歌不要刷新令牌会过期吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆