-
Notifications
You must be signed in to change notification settings - Fork 618
[React] Feature: Export web getLastAuthProvider
#5697
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
[React] Feature: Export web getLastAuthProvider
#5697
Conversation
🦋 Changeset detectedLatest commit: f778d30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5697 +/- ##
==========================================
+ Coverage 51.52% 51.54% +0.02%
==========================================
Files 1093 1094 +1
Lines 57588 57592 +4
Branches 4755 4755
==========================================
+ Hits 29671 29686 +15
+ Misses 27200 27188 -12
- Partials 717 718 +1
*This pull request uses carry forward flags. Click here to find out more.
|
Merge activity
|
<!-- start pr-codex -->
## PR-Codex overview
This PR introduces a new utility function `getLastAuthProvider` to retrieve the most recently used authentication provider from local storage. It also exports the `LAST_AUTH_PROVIDER_STORAGE_KEY` for consistent access.
### Detailed summary
- Added `getLastAuthProvider` function in `packages/thirdweb/src/react/web/utils/storage.ts`.
- Exported `LAST_AUTH_PROVIDER_STORAGE_KEY` from `packages/thirdweb/src/react/core/utils/storage.ts`.
- Created tests for `getLastAuthProvider` in `packages/thirdweb/src/react/web/utils/storage.test.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
4ab4e13 to
f778d30
Compare
PR-Codex overview
This PR introduces a new utility function
getLastAuthProviderto retrieve the most recently used authentication provider from local storage. It also updates theLAST_AUTH_PROVIDER_STORAGE_KEYto be exported and includes tests for the new function.Detailed summary
getLastAuthProviderfunction to retrieve the last auth provider from local storage.LAST_AUTH_PROVIDER_STORAGE_KEYfor external use.getLastAuthProviderto check for existing strategies and null returns.webLocalStoragein tests for controlled behavior.