Open the app in a separate window instead of navigating away or embedding it. The current page never unloads. Reach for this when a full-page redirect is too heavy but you don’t want the app inline — and it’s the recommended route for React Native, where it runs in the system auth session (ASWebAuthenticationSession on iOS / Chrome Custom Tabs on Android). See the overview for detection, hosting, and the shared CORS requirements.
On the web, browsers block popups that aren’t opened from a user gesture. Call openUpgradePopup (or the hook’s open) synchronously inside the click handler — don’t await anything before it, or the popup is blocked and you get an UpgradePopupBlockedError.
TypeScript
React
React Native
openUpgradePopup opens the window synchronously and resolves completed when the app reports done (refreshing the session on success). completed rejects with an UpgradePopupClosedError if the user closes the popup first, and the call throws an UpgradePopupBlockedError if the browser blocks it.useUpgradePopup wraps the popup lifecycle: call open from a click handler, then drive your UI off result (the outcome once complete, undefined until then) and error (set on a dismissed/blocked popup or open failure). onComplete / onError callbacks are also available if you prefer. The popup is closed for you on unmount.There is no browser window on React Native, so useUpgradePopup runs the app in the system auth session the SDK already uses for native OAuth. The app returns to your configured deep link, and the outcome is parsed from the callback URL (refreshing the session on success). This requires the same client configuration native social sign-in needs — metadata.nativeLink and coreConfig.openAuthSession must be set. The hook exposes the same result / error values as on web.The redirectUrl defaults to metadata.nativeLink. Pass an explicit redirectUrl only if you want to return to a different registered deep link.
Handling errors
See also