Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add _acquireLock and navigatorLock #736

Merged
merged 1 commit into from
Jul 18, 2023
Merged

feat: add _acquireLock and navigatorLock #736

merged 1 commit into from
Jul 18, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Jul 15, 2023

Built on top of: #734

Adds an experimental lock option. This is used internally within _acquireLock() which can be used to acquire a global exclusive lock when using the client. It can prevent issues with concurrent access to local storage.

navigatorLock is an experimental lock that can be used to test the library before officially designating it (or an alternative) as the default global exclusive locking mechanism. It will be rolled out on supabase.com/dashboard over time as we grow our confidence in the library.

@hf hf changed the title Hf/add lock option feat: add _acquireLock and navigatorLock Jul 15, 2023
src/lib/locks.ts Show resolved Hide resolved
@J0 J0 self-requested a review July 18, 2023 07:54
@hf hf merged commit 406e95e into master Jul 18, 2023
2 checks passed
@hf hf deleted the hf/add-lock-option branch July 18, 2023 16:13
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.44.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

hf added a commit that referenced this pull request Sep 20, 2023
Given the changes introduced in #736, some of the MFA methods were
exempt from acquiring the lock. However, this appears to have been a bad
idea, especially around `_getAuthenticatedAssuranceLevel` which is used
while the user is authenticated.

This PR adds the locks in the correct places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants