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.
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.