Skip to content

Commit da4453c

Browse files
committed
fix(clerk-js): Revert removal of transfer strategy passing
We removed this in a recent PR because we thought it was a no-op because the backend appeared to be pulling the correct strategy from the sign in on transfer anyway, instead of getting it from the transfer request params. However, we recently encountered some mysterious issues with captcha bypass and Enterprise SSO. Revert this change to test if it was actually doing something.
1 parent 2931a66 commit da4453c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎.changeset/slimy-buckets-hide.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
---
4+
5+
Revert change in transfer strategy params

‎packages/clerk-js/src/core/resources/SignUp.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ export class SignUp extends BaseResource implements SignUpResource {
173173
finalParams = { ...finalParams, ...captchaParams };
174174
}
175175

176+
if (finalParams.transfer && this.shouldBypassCaptchaForAttempt(finalParams)) {
177+
const strategy = SignUp.clerk.client?.signIn.firstFactorVerification.strategy;
178+
if (strategy) {
179+
finalParams = { ...finalParams, strategy: strategy as SignUpCreateParams['strategy'] };
180+
}
181+
}
182+
176183
return this._basePost({
177184
path: this.pathRoot,
178185
body: normalizeUnsafeMetadata(finalParams),

0 commit comments

Comments
 (0)