Closed GeoffreyHuck closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
d033fd6
) to head (961809d
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR includes two changes:
1. If we try to refresh with a token that is not the most recent one for the session, we return the most recent one, with the expiration time 2. If a session has been refreshed less than 5 minutes ago, we just return the current token without refreshing, with the expiration time
Sorry, it is not clear to me:
Related to #1022
This PR includes two changes:
Easier to read commit by commit, with the details in commit descriptions.
The lock
userID
have been changed to be onsessionID
There was a lock on
userID
to prevent multiple refresh concurrently. It was modified to be on thesessionID
instead, because we don't want to have a lock waiting on one device because we coincidentally have a refresh on another device for the same user.I had a bug with it (two last commits), because a test was using the lock manually without clearing it, a another test was blocked because it uses the same
sessionID
. It's weird to use the lock manually instead of using the implementation functionwithLock
, which would have cleaned it automatically. Anyway, the test was updated to clear the lock, to fix the bug.