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 the refreshToken never expire bug #82

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jydxh
Copy link

@jydxh jydxh commented Aug 2, 2024

add the expiredIn attribute in the Token Schema, and use this date as reference, pass it into the cookie expires props, so the refreshToken will have an expired date as per value saved in DB.
Also, when user login, the refreshToken, and the expiredDate will be updated and save in DB.

jydxh added 2 commits August 2, 2024 10:11
@jydxh
Copy link
Author

jydxh commented Aug 2, 2024

also, change the jwt.sign and jwt.verify into async way, so it wont block the I/O

@jydxh jydxh closed this Aug 2, 2024
@jydxh jydxh reopened this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant