-
Notifications
You must be signed in to change notification settings - Fork 406
feat(clerk-js,shared): Add support for modal sign-up in signals #7193
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
Conversation
🦋 Changeset detectedLatest commit: 6a54d76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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.
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis PR adds experimental support for sign-up via modal in the signals implementation by introducing popup routing logic, updating type definitions to support Window-based popup objects and additional SSO parameters (identifier, oidcPrompt, enterpriseConnectionId, emailAddress), and refactoring the SSO flow to handle modal-based authentication with redirect URL management. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant SignUpFuture
participant PopupRouter
participant AuthService
participant ExternalService
User->>App: Initiate SSO signup with popup
App->>SignUpFuture: sso({ strategy, popup, redirectUrlComplete, ... })
alt Popup Mode
SignUpFuture->>PopupRouter: wrapWithPopupRoutes(strategy, redirectUrl)
PopupRouter-->>SignUpFuture: wrapped routes
SignUpFuture->>AuthService: POST with routes + strategy
AuthService->>ExternalService: External verification
ExternalService-->>AuthService: Verify response
alt Verification Unverified
AuthService-->>SignUpFuture: externalVerificationRedirectURL
SignUpFuture->>SignUpFuture: _futureAuthenticateWithPopup()
SignUpFuture->>SignUpFuture: reload resource
else Verification Complete
AuthService-->>SignUpFuture: Success
SignUpFuture->>App: Signal completion
end
else Standard Mode
SignUpFuture->>AuthService: POST strategy + fields
AuthService->>App: Navigate to externalVerificationRedirectURL
end
alt Captcha Error
AuthService-->>SignUpFuture: Captcha error
SignUpFuture->>App: Reload environment
SignUpFuture->>AuthService: Retry authenticateFn
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
Description
This PR adds support for passing a
WindowtosignUp.ssovia thepopupparameter to perform external verification via a modal window.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Release Notes