supabase / auth-js

An isomorphic Javascript library for Supabase Auth.
MIT License
319 stars 152 forks source link

fix: implement exponential back off on the retries of `_refreshAccessToken` method #869

Closed dshukertjr closed 2 months ago

dshukertjr commented 3 months ago

What kind of change does this PR introduce?

Currently the retry interval of _refreshAccessToken goes 200, 400, 600, 800, where as I believe the intended intervals are 200, 400, 800, 1600...

What is the current behavior?

The retry interval is multiple of 200 ms.

What is the new behavior?

The retry interval is properly set exponentially.