| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
🦋 Changeset detectedLatest commit: 21bb835 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Sorry, something went wrong.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
Update the version of @clerk/clerk-js from major to patch and fix handling of missing window.location in React Native navigation.
Fixed crash in React Native when `window.location` is undefined during navigation, improving redirect-based flows.
There was a problem hiding this comment.
Looks good, thanks!
Sorry, something went wrong.
|
Thought the core-2 branch was an error @wobsoriano ? |
Sorry, something went wrong.
Oof my bad. Would you like to cherry pick this pointing to release/core-2? I can approve and merge. Not on my laptop atm |
Sorry, something went wrong.
Yup will do! Np. |
Sorry, something went wrong.
Done here: #7854 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
The fix that I have added is for the "needs second factor":
When signing in with password on a new/unrecognized device, Clerk's Client Trust feature returns needs_second_factor status. Clerk then tries to navigate to the second factor UI by calling its internal navigate() function.
The problem: navigate() in packages/clerk-js/src/core/clerk.ts does this:
let toURL = new URL(to, window.location.href);
In React Native:
Result: Crash with "Cannot read property 'href' of undefined"
We now check for the window location, and if it cant be found, we will replace the navigation with a router.push / router.replace because in React Native, there's no window.location, the router is the only way to navigate. The fix checks: if window.location is undefined, use the custom router. If no custom router was provided either, warn and bail out gracefully instead of crashing.
MOBILE-392: Evan Bacon - Expo SDK issues
Checklist
Type of change