Skip to content
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

fix: access token will expired after 24h #1988

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

NicoleRobin
Copy link
Contributor

这里在登录后生成了两个token:access_token、refresh_access;

access_token有效期是24h,refresh_token有效期是7天,理论上只要refresh_token有效,即使access_token过期了也应该重新生成新的access_token,但是目前的实现先判断了access_token的有效,如果无效就直接返回401了,就导致只要超过24h就需要重新登陆。

改为取消对于access_token有效期的判断,只有refresh_token也失效了才返回401;

@NicoleRobin NicoleRobin requested a review from boojack as a code owner July 18, 2023 17:31
@github-actions
Copy link

github-actions bot commented Jul 18, 2023

Uffizzi Preview deployment-31212 was deleted.

@NicoleRobin NicoleRobin mentioned this pull request Jul 18, 2023
Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution!

@boojack boojack changed the title Update - fix bug: access token will expired after 24h fix: access token will expired after 24h Jul 19, 2023
@boojack boojack merged commit 8bcc2bd into usememos:main Jul 19, 2023
@athurg athurg added bug Something isn't working backend labels Jul 19, 2023
lincolnthalles pushed a commit to lincolnthalles/memos that referenced this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants