-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: implement refresh_token API #938
Conversation
I'll suggest go with this approach, example: The tokio job can be spawned when creating db conn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
563168e
to
bf0c828
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also:
- Resolve conflicts.
- Update schema file (if needed)
559af8f
to
02f7ff6
Compare
follow up of #912
Changes include:
refresh_tokens
table, add r/w operationsregister
API, since it's new user, we always generate new refresh token and return ittoken_auth
API, first we check if there exists valid (unexpired) refresh token for current user, if not, generate new onePending task:
implemement
revoke_token
expires_in
field, invalidate current token.To clean up expired refresh tokens, there are two options:
@wsxiaoys what's your suggestion?