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

登录后返回 expires 指示有效期 #1

Open
yusanshi opened this issue May 8, 2020 · 2 comments
Open

登录后返回 expires 指示有效期 #1

yusanshi opened this issue May 8, 2020 · 2 comments
Labels
enhancement New feature or request P-low Low Priority

Comments

@yusanshi
Copy link
Contributor

yusanshi commented May 8, 2020

目前的登录设计是登录后返回 role、token 和 expires,客户端在发请求或重载 token 前检查一下是否过期,避免再去直接请求然后 401。
https://github.com/i-m-feeling-lucky/miscellaneous/blob/f10ccd78277c878721156f5f957c6070dd801714/api.yaml#L52-L59

但是现在登录的返回信息还没有 expires(比如 86400 表示有效期一天)。
image

@weirane
Copy link
Contributor

weirane commented May 8, 2020

我来加一下, expires 要设为多少啊

@yusanshi
Copy link
Contributor Author

yusanshi commented May 8, 2020

不知道,你自己定吧🤣 8h,1d,3d 哈哈我觉得都成

@weirane weirane added P-low Low Priority enhancement New feature or request labels May 8, 2020
yusanshi added a commit to i-m-feeling-lucky/frontend that referenced this issue May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P-low Low Priority
Projects
None yet
Development

No branches or pull requests

2 participants