Skip to content

Comments

fix the refreshToken never expire bug#82

Open
jydxh wants to merge 2 commits intojohn-smilga:mainfrom
jydxh:main
Open

fix the refreshToken never expire bug#82
jydxh wants to merge 2 commits intojohn-smilga:mainfrom
jydxh:main

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