fix(expo): present inline AuthView as modal to fix OAuth from forgot-…#8260
fix(expo): present inline AuthView as modal to fix OAuth from forgot-…#8260chriscanin wants to merge 4 commits intomainfrom
Conversation
…password The inline AuthView embedded as a child UIHostingController in React Native's view hierarchy disrupts ASWebAuthenticationSession callbacks during OAuth flows. SSO from the forgot-password screen would silently fail because the OAuth callback couldn't properly update Clerk.shared.client in the embedded context. This changes ClerkAuthNativeView to present the AuthView as a full-screen modal (matching the working presentAuth() behavior) instead of embedding it inline. Also adds retry logic for modal presentation after sign-out to handle cases where a previous modal (e.g., UserProfileView) is still dismissing.
🦋 Changeset detectedLatest commit: 69f484d 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 GitHub.
|
Replace the unconditional 0.3s asyncAfter delay with presentWhenReady(), which presents the auth modal synchronously when possible. The fixed delay caused a visible white flash on initial mount because ClerkAuthNativeView is an empty UIView while waiting to present. When a previous modal (e.g., UserProfileView sign-out) is still dismissing, use UIViewController.transitionCoordinator to wait for the animation to complete instead of polling. Falls back to a one-frame DispatchQueue.main.async retry only when no coordinator is available yet.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe iOS auth UI presentation was changed from embedding a Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
!snapshot |
|
Hey @chriscanin - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.3.12-snapshot.v20260407211301 --save-exact
npm i @clerk/astro@3.0.12-snapshot.v20260407211301 --save-exact
npm i @clerk/backend@3.2.8-snapshot.v20260407211301 --save-exact
npm i @clerk/chrome-extension@3.1.9-snapshot.v20260407211301 --save-exact
npm i @clerk/clerk-js@6.5.1-snapshot.v20260407211301 --save-exact
npm i @clerk/dev-cli@0.1.1-snapshot.v20260407211301 --save-exact
npm i @clerk/expo@3.1.9-snapshot.v20260407211301 --save-exact
npm i @clerk/expo-passkeys@1.0.10-snapshot.v20260407211301 --save-exact
npm i @clerk/express@2.1.0-snapshot.v20260407211301 --save-exact
npm i @clerk/fastify@3.1.10-snapshot.v20260407211301 --save-exact
npm i @clerk/hono@0.1.10-snapshot.v20260407211301 --save-exact
npm i @clerk/localizations@4.3.3-snapshot.v20260407211301 --save-exact
npm i @clerk/msw@0.0.10-snapshot.v20260407211301 --save-exact
npm i @clerk/nextjs@7.0.12-snapshot.v20260407211301 --save-exact
npm i @clerk/nuxt@2.1.2-snapshot.v20260407211301 --save-exact
npm i @clerk/react@6.2.1-snapshot.v20260407211301 --save-exact
npm i @clerk/react-router@3.0.12-snapshot.v20260407211301 --save-exact
npm i @clerk/shared@4.5.1-snapshot.v20260407211301 --save-exact
npm i @clerk/tanstack-react-start@1.0.12-snapshot.v20260407211301 --save-exact
npm i @clerk/testing@2.0.12-snapshot.v20260407211301 --save-exact
npm i @clerk/ui@1.4.1-snapshot.v20260407211301 --save-exact
npm i @clerk/upgrade@2.0.3-snapshot.v20260407211301 --save-exact
npm i @clerk/vue@2.0.11-snapshot.v20260407211301 --save-exact |
The inline AuthView embedded as a child UIHostingController in React Native's view hierarchy disrupts ASWebAuthenticationSession callbacks during OAuth flows. SSO from the forgot-password screen silently fails because the OAuth callback can't properly update Clerk.shared.client in the embedded context.
Switched ClerkAuthNativeView to present its UIHostingController via UIViewController.present() instead of embedding it as a child view. The visual appearance is unchanged (fullscreen, no animation), but this fixes ASWebAuthenticationSession OAuth callbacks which silently fail when the hosting controller is embedded in React Native's view hierarchy.
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change