-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refreshtoken过期的问题 #3
Comments
如果你不想让他过期可以设置为30天,或者更加长的时间。token有效期,refreshtoken有效期你都是可以更加业务自定义 |
好的谢谢,那么refreshtoken如何刷新呢,或者说如何给refreshtoken增加存活期 |
refreshtoken 不可以刷新,目前只有配置文件可以修改过期时间。不支持增加存活期 |
好吧。。建议你处理一下这个问题,正常应该是用户无感知的。目前的状况,即便我把refreshtoken的有效期加的再长,到期后也可能会出现用户正在使用的时候,突然需要重新登录了 |
用户无感知,就是使用refreshtoken换取accesstoken就可以了,不建议refreshtoken设置的比较长。会存在安全隐患。你的需求可否详细说明一下? |
举个例子。accesstoken有效期2小时,refreshtoken8小时,每2小时用refreshtoken获取一次新的accesstoken,当第10个小时accesstoken又过期了的时候,再用refreshtoken获取accesstoken就不行了,因为这时候refreshtoken也过期了。此时两个token都过期了,就只能重新登录了。 |
我们实际业务中
以上并没有遇到什么问题 |
7天之后refreshtoken不过期吗。。 |
过期,需要重新登录。其实就像微信的那个令牌一样,设置有效期也是为了安全 |
需要登录倒是对的,但是一般都是用户很长时间没有用过app的情况下才重新登录,如果用户一直都正常使用或者说每天都在使用的情况下,不应该用着用着突然跳登录去了 |
那你设置过期时间长点不就可以解决了吗?哈哈! |
按照目前这种情况,假如token有效期两小时,refreshtoken有效期7天。token过期了,可以凭refreshtoken获取新token,但是refreshtoken一直是7天有效期的话,就会出现,当refreshtoken过期了的时候,就需要重新登录了,这种场景下,就可能会出现用户正在正常使用的过程中,突然需要重新登录了
The text was updated successfully, but these errors were encountered: