feat(ui): support Electron native OAuth redirects#8750
Conversation
🦋 Changeset detectedLatest commit: 8a1744d The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
!snapshot |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@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: |
This comment has been minimized.
This comment has been minimized.
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
|
!snapshot |
This comment has been minimized.
This comment has been minimized.
|
!snapshot |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
!snapshot |
|
Hey @wobsoriano - 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/astro@3.3.4-snapshot.v20260608163957 --save-exact
npm i @clerk/backend@3.5.1-snapshot.v20260608163957 --save-exact
npm i @clerk/chrome-extension@3.1.33-snapshot.v20260608163957 --save-exact
npm i @clerk/clerk-js@6.15.0-snapshot.v20260608163957 --save-exact
npm i @clerk/expo@3.3.2-snapshot.v20260608163957 --save-exact
npm i @clerk/expo-passkeys@1.1.2-snapshot.v20260608163957 --save-exact
npm i @clerk/express@2.1.24-snapshot.v20260608163957 --save-exact
npm i @clerk/fastify@3.1.34-snapshot.v20260608163957 --save-exact
npm i @clerk/hono@0.1.34-snapshot.v20260608163957 --save-exact
npm i @clerk/localizations@4.7.2-snapshot.v20260608163957 --save-exact
npm i @clerk/msw@0.0.32-snapshot.v20260608163957 --save-exact
npm i @clerk/nextjs@7.4.4-snapshot.v20260608163957 --save-exact
npm i @clerk/nuxt@2.5.4-snapshot.v20260608163957 --save-exact
npm i @clerk/react@6.7.4-snapshot.v20260608163957 --save-exact
npm i @clerk/react-router@3.3.4-snapshot.v20260608163957 --save-exact
npm i @clerk/shared@4.16.0-snapshot.v20260608163957 --save-exact
npm i @clerk/tanstack-react-start@1.3.4-snapshot.v20260608163957 --save-exact
npm i @clerk/testing@2.0.36-snapshot.v20260608163957 --save-exact
npm i @clerk/ui@1.16.0-snapshot.v20260608163957 --save-exact
npm i @clerk/upgrade@2.0.4-snapshot.v20260608163957 --save-exact
npm i @clerk/vue@2.3.4-snapshot.v20260608163957 --save-exact |
Description
Adds experimental support for native OAuth redirects in Clerk JS/UI so Electron can use Clerk prebuilt components without forking SignIn, SignUp, or UserProfile connected account flows.
The implementation keeps the existing browser APIs as the public entry point. SignIn and SignUp components still call
authenticateWithRedirect(), and the SignIn/SignUp resources continue through the existingauthenticateWithRedirectOrPopuppath. When a native OAuth handler is registered on the Clerk instance, that path swaps only the transport layer:__internal_nativeOAuthHandler.getRedirectUrl()as the FAPI redirect URL, for examplemyapp://sso-callback__internal_nativeOAuthHandler.open(url)instead of navigating the current browser context__internal_handleNativeOAuthCallbackThis PR is intentionally scoped to the Clerk component flows that need OAuth/SSO transport changes for Electron:
SignInSignInSignUpUserProfile, including enterprise account connectionsDefault web behavior is unchanged. If
__internal_nativeOAuthHandleris not registered, the components continue using the existing browser redirect or popup flow.The planned
@clerk/electronSDK will provide the Electron-specific runtime pieces and register this internal handler from its renderer provider, expected to be imported from@clerk/electron/react. That SDK layer is responsible for main/preload setup, opening the system browser, waiting for the custom-scheme callback, and secure token persistence. The JS/UI packages only define and consume the internal native OAuth transport contract.This also adds tests for native OAuth success and cancellation/error handling so provider cancellation can stop the loading state, surface the verification error, and reset stale SignIn/SignUp attempts.
Type of change