-
-
Notifications
You must be signed in to change notification settings - Fork 196
feat: add process lock for optional use in non-browser environments (React Native) #977
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d41d2cd
to
e12fe4d
Compare
e12fe4d
to
ffc9f8f
Compare
kangmingtay
approved these changes
Nov 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should update our react native guides to use this when creating the supabase client
kangmingtay
pushed a commit
that referenced
this pull request
Nov 6, 2024
🤖 I have created a release *beep* *boop* --- ## [2.66.0](v2.65.1...v2.66.0) (2024-11-01) ### Features * add process lock for optional use in non-browser environments (React Native) ([#977](#977)) ([8af88b6](8af88b6)) ### Bug Fixes * typo in warning message ([#975](#975)) ([4f21f93](4f21f93)) * update soft-deletion docs ([#973](#973)) ([cb052a9](cb052a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
J0
pushed a commit
that referenced
this pull request
Nov 12, 2024
…React Native) (#977) When using the library in non-browser environments like React Native or other JavaScript-based runtimes (Electron's main process for example) certain race conditions could still occur. We've received some signal from customers using React Native that at scale these become more visible. This is why I'm introducing a `processLock` that developers can import like so: ```typescript import { processLock } from '@supabase/auth-js/lib/locks' ``` And add to their apps by specifying the lock option with the process lock.
J0
pushed a commit
that referenced
this pull request
Nov 12, 2024
🤖 I have created a release *beep* *boop* --- ## [2.66.0](v2.65.1...v2.66.0) (2024-11-01) ### Features * add process lock for optional use in non-browser environments (React Native) ([#977](#977)) ([8af88b6](8af88b6)) ### Bug Fixes * typo in warning message ([#975](#975)) ([4f21f93](4f21f93)) * update soft-deletion docs ([#973](#973)) ([cb052a9](cb052a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This was referenced Apr 16, 2025
hf
added a commit
that referenced
this pull request
May 16, 2025
Process lock was added in #977 but wasn't exported in top-level which made imports hard.
mandarini
pushed a commit
to supabase/supabase-js
that referenced
this pull request
Oct 2, 2025
🤖 I have created a release *beep* *boop* --- ## [2.66.0](supabase/auth-js@v2.65.1...v2.66.0) (2024-11-01) ### Features * add process lock for optional use in non-browser environments (React Native) ([#977](supabase/auth-js#977)) ([0f7b2b8](supabase/auth-js@0f7b2b8)) ### Bug Fixes * typo in warning message ([#975](supabase/auth-js#975)) ([3185569](supabase/auth-js@3185569)) * update soft-deletion docs ([#973](supabase/auth-js#973)) ([c569aca](supabase/auth-js@c569aca)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the library in non-browser environments like React Native or other JavaScript-based runtimes (Electron's main process for example) certain race conditions could still occur.
We've received some signal from customers using React Native that at scale these become more visible. This is why I'm introducing a
processLock
that developers can import like so:And add to their apps by specifying the lock option with the process lock.