-
Notifications
You must be signed in to change notification settings - Fork 354
fix(clerk-js): Fix stale SignIn
object on authenticateWithRedirect
for enterprise custom flows
#5124
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
Open
LauraBeatris
wants to merge
1
commit into
main
Choose a base branch
from
laura/fix-custom-flow-sso
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 73eb240 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
SignIn
on authenticateWithRedirect
callSignIn
on authenticateWithRedirect
call for custom flows
c23830e
to
076a6d5
Compare
076a6d5
to
6406084
Compare
SignIn
on authenticateWithRedirect
call for custom flowsSignIn
object on authenticateWithRedirect
for custom flows
d6ae989
to
c6ca8d8
Compare
c6ca8d8
to
3219cf7
Compare
3219cf7
to
ceb00c4
Compare
ceb00c4
to
73eb240
Compare
SignIn
object on authenticateWithRedirect
for custom flowsSignIn
object on authenticateWithRedirect
for enterprise custom flows
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolves ORGS-540
Currently,
authenticateWithRedirect
always uses the existingSignIn
forsaml
orenterprise_sso
strategy, even if the identifier gets changed by the user in a custom flow, which leads to an issue where FAPI queries the wrong enterprise connection:CleanShot.2025-02-10.at.16.20.39.mp4
Our
SignInStart
component always creates a newSignIn
; therefore, the flow above works smoothly:javascript/packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx
Lines 299 to 312 in e182055
With fix
This PR introduces a new
continueSignIn
option forsignIn.authenticateWithRedirect
, which defaults tofalse
, therefore it'll create a newSignIn
object on every call.Within
SignInStart
, we passcontinueSignIn
asfalse
in order to reuse the currentSignIn
created, in order to avoid callingsignIn.create
twice.CleanShot.2025-02-10.at.16.21.32.mp4
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change