如果发出新的刷新令牌,旧的刷新令牌是否仍然有效? [英] Will an old refresh token still be valid if a new refresh token get issued?
本文介绍了如果发出新的刷新令牌,旧的刷新令牌是否仍然有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序使用Google刷新令牌(从Google获取access_token).我在这里有两个问题:
My application uses a Google refresh token (to get access_token from Google). I have two questions here:
- 我知道Google刷新令牌不会在6个月内过期(在此处查看文档);说我在1月1日下午5:00获得了刷新令牌
refresh_token_old
,我的应用在1月1日下午5:30向Google请求了另一个刷新令牌refresh_token_new
(即,30分钟后),旧的刷新令牌是否仍然有效(显然旧的令牌尚未过期)?-基本上,我要问的是,新发布的refresh_token是否清除了旧的refresh_token的有效性; - 对于访问令牌,我使用
refresh_token_old
从Google那里获得的access_token_a
,在我的应用请求新的新令牌refresh_token_new 后,它仍然有效吗?代码>?-基本上,我在问新的refresh_token是否清除了旧的refresh_token获得的access_token的有效性,即使该access_token尚未过期;
- I know Google refresh token does not expire for 6 months (see the doc here); say I got a refresh token
refresh_token_old
at 5:00pm on Jan 1st , and my application requests another refresh tokenrefresh_token_new
from Google at 5:30pm on Jan 1st (i.e., just 30 minute later), will the old refresh token still be valid (apparently the old one has not been expired)? -- basically, I am asking if the newly issued refresh_token purges the validity of the old refresh_token; - For the access token,
access_token_a
, which I got from Google usingrefresh_token_old
, is it still valid after my app requested the new fresh tokenrefresh_token_new
? -- basically, I am asking if the new refresh_token purges the validity of the access_token obtained by an old refresh_token even if that access_token has not expired;
推荐答案
- 如果刷新令牌六个月未使用,它将失效.六个月后,计时器一经使用就会重置.
- 如果您请求刷新令牌,则您的应用程序随后会请求另一个刷新令牌,从技术上讲,您有两个未完成的刷新令牌,这两个令牌都可以使用.您可以继续这样做,并在达到该点后立即拥有多达五十个醒目的刷新令牌.
- 使用任何刷新令牌创建的任何访问令牌都可以使用一个小时.即使创建它的刷新令牌在该小时内过期.创建访问令牌后,不管使用什么令牌,它都会工作一个小时.
这篇关于如果发出新的刷新令牌,旧的刷新令牌是否仍然有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文