My bad i closed the issue since the config error was on my end i had two core service running 😳
r
rp_st
07/24/2022, 7:00 AM
ahh right! Sounds good.
d
doraig
07/24/2022, 7:02 AM
I did see that there is an off set of 30 seconds between the access token and jwt expiry, is this by design
r
rp_st
07/24/2022, 7:02 AM
yes. That is by design
rp_st
07/24/2022, 7:04 AM
Its there cause when you do
getAccessTokenPayload()
, that decides if a refresh is needed based on the access token's lifetime.
There might be an edge case where right before the access token is about to expire, you call the function, and it doesn't refresh. The resulting JWT in that case, if used to send to another service, can hence be expired. So to sort of relax this edge case a bit, we added an extra 30 secs to the JWT expiry.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).