supabase / auth-js

An isomorphic Javascript library for Supabase Auth.
MIT License
321 stars 153 forks source link

feat: remove stack guards, lock on external calls #757

Closed hf closed 10 months ago

hf commented 11 months ago

Previously, the library attempted to synchronize access to the storage across browsers and tabs using a global lock initiated by the _useSession function. Because some recursive calls (i.e. _useSession called within _useSession) were likely, the concept of a stack guard was implemented to detect such calls. This prevented deadlocks with recursion. However, stack guards appear to be quite flaky depending on the environment in which the library runs (not supported in WebKit based platforms) or transpilation/compilation/minifaction toolchains.

To go around these issues, a different approach is attempted here:

sync commented 10 months ago

tested in react-native and expo and the warning is now gone, thank you

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 2.47.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: