fix(clerk-js): Fix stale SignIn object on authenticateWithRedirect for enterprise custom flows#5124
Closed
LauraBeatris wants to merge 1 commit intomainfrom
Closed
fix(clerk-js): Fix stale SignIn object on authenticateWithRedirect for enterprise custom flows#5124LauraBeatris wants to merge 1 commit intomainfrom
SignIn object on authenticateWithRedirect for enterprise custom flows#5124LauraBeatris wants to merge 1 commit intomainfrom
Conversation
🦋 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
Member
Author
|
The issue still remains that this PR is super stale since we merged changes for |
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
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,
authenticateWithRedirectalways uses the existingSignInforsamlorenterprise_ssostrategy, 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
SignInStartcomponent 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
continueSignInoption forsignIn.authenticateWithRedirect, which defaults tofalse, therefore it'll create a newSignInobject on every call.Within
SignInStart, we passcontinueSignInasfalsein order to reuse the currentSignIncreated, in order to avoid callingsignIn.createtwice.CleanShot.2025-02-10.at.16.21.32.mp4
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change