Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 469
fix(clerk-js): Revert removal of transfer strategy passing#7962
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@clerk/clerk-js': minor | ||
| '@clerk/shared': minor | ||
| --- | ||
| Revert sign up if missing changes to fix Enterprise SSO captcha |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transfer flows with missing strategy are now gated out, breaking intended strategy propagation
The new
if (!params.strategy) return false;guard prevents transfer logic from consultingSignIn.firstFactorVerification.strategywhen strategy is missing. That blocks the bypass decision and the transfer strategy injection path increate, which is the core behavior this PR is trying to restore.🔧 Proposed fix
protected shouldBypassCaptchaForAttempt(params: SignUpCreateParams) { - if (!params.strategy) {- return false;- }- // eslint-disable-next-line `@typescript-eslint/no-non-null-assertion` const captchaOauthBypass = SignUp.clerk.__internal_environment!.displayConfig.captchaOauthBypass; - if (captchaOauthBypass.some(strategy => strategy === params.strategy)) {+ if (params.strategy && captchaOauthBypass.some(strategy => strategy === params.strategy)) { return true; } if ( params.transfer && // eslint-disable-next-line `@typescript-eslint/no-non-null-assertion` captchaOauthBypass.some(strategy => strategy === SignUp.clerk.client!.signIn.firstFactorVerification.strategy) ) { return true; } return false; } private shouldBypassCaptchaForAttempt(params: { strategy?: string; transfer?: boolean }) { - if (!params.strategy) {- return false;- }- // eslint-disable-next-line `@typescript-eslint/no-non-null-assertion` const captchaOauthBypass = SignUp.clerk.__internal_environment!.displayConfig.captchaOauthBypass; - if (captchaOauthBypass.some(strategy => strategy === params.strategy)) {+ if (params.strategy && captchaOauthBypass.some(strategy => strategy === params.strategy)) { return true; } if ( params.transfer && // eslint-disable-next-line `@typescript-eslint/no-non-null-assertion` captchaOauthBypass.some(strategy => strategy === SignUp.clerk.client!.signIn.firstFactorVerification.strategy) ) { return true; } return false; }Also applies to: 564-579, 789-805
🤖 Prompt for AI Agents