doraig
07/24/2022, 5:51 AMrp
07/24/2022, 5:53 AMdoraig
07/24/2022, 6:09 AMrp
07/24/2022, 6:10 AMdoraig
07/24/2022, 7:00 AMrp
07/24/2022, 7:00 AMdoraig
07/24/2022, 7:02 AMrp
07/24/2022, 7:02 AMgetAccessTokenPayload()
, 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.