Skip to content

Commit bcde4dc

Browse files
authored
Merge branch 'release/v4' into gatsby-eol-notice-to-v4
2 parents e5ab9ba + 9fccbb1 commit bcde4dc

File tree

7 files changed

+59
-6
lines changed

7 files changed

+59
-6
lines changed

packages/chrome-extension/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`9c499ea78`](https://github.com/clerk/javascript/commit/9c499ea787af67bb0a3e0b02c8001145df81308b)]:
8+
- @clerk/clerk-js@4.73.4
9+
310
## 0.7.3
411

512
### Patch Changes

packages/chrome-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clerk/chrome-extension",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"description": "Clerk SDK for Chrome extensions",
55
"keywords": [
66
"auth",
@@ -45,7 +45,7 @@
4545
"test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html"
4646
},
4747
"dependencies": {
48-
"@clerk/clerk-js": "4.73.3",
48+
"@clerk/clerk-js": "4.73.4",
4949
"@clerk/clerk-react": "4.32.2"
5050
},
5151
"devDependencies": {

packages/clerk-js/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 4.73.4
4+
5+
### Patch Changes
6+
7+
- Adjust how we pass captcha tokens to the Clerk API when signing in with Google, Microsoft, and Apple ([#3817](https://github.com/clerk/javascript/pull/3817)) by [@hhsnopek](https://github.com/hhsnopek)
8+
39
## 4.73.3
410

511
### Patch Changes

packages/clerk-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clerk/clerk-js",
3-
"version": "4.73.3",
3+
"version": "4.73.4",
44
"description": "Clerk JS library",
55
"keywords": [
66
"clerk",

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ export class SignUp extends BaseResource implements SignUpResource {
7474
const { captchaSiteKey, canUseCaptcha, captchaURL, captchaWidgetType, captchaProvider, captchaPublicKeyInvisible } =
7575
retrieveCaptchaInfo(SignUp.clerk);
7676

77-
if (canUseCaptcha && captchaSiteKey && captchaURL && captchaPublicKeyInvisible) {
77+
if (
78+
!this.shouldBypassCaptchaForAttempt(params) &&
79+
canUseCaptcha &&
80+
captchaSiteKey &&
81+
captchaURL &&
82+
captchaPublicKeyInvisible
83+
) {
7884
try {
7985
const { captchaToken, captchaWidgetTypeUsed } = await getCaptchaToken({
8086
siteKey: captchaSiteKey,
@@ -94,6 +100,10 @@ export class SignUp extends BaseResource implements SignUpResource {
94100
}
95101
}
96102

103+
if (params.transfer && this.shouldBypassCaptchaForAttempt(params)) {
104+
paramsWithCaptcha.strategy = SignUp.clerk.client?.signIn.firstFactorVerification.strategy;
105+
}
106+
97107
return this._basePost({
98108
path: this.pathRoot,
99109
body: normalizeUnsafeMetadata(paramsWithCaptcha),
@@ -324,4 +334,27 @@ export class SignUp extends BaseResource implements SignUpResource {
324334
}
325335
return this;
326336
}
337+
338+
/**
339+
* We delegate bot detection to the following providers, instead of relying on turnstile exclusively
340+
*/
341+
protected shouldBypassCaptchaForAttempt(params: SignUpCreateParams) {
342+
if (
343+
params.strategy === 'oauth_google' ||
344+
params.strategy === 'oauth_microsoft' ||
345+
params.strategy === 'oauth_apple'
346+
) {
347+
return true;
348+
}
349+
if (
350+
params.transfer &&
351+
(SignUp.clerk.client?.signIn.firstFactorVerification.strategy === 'oauth_google' ||
352+
SignUp.clerk.client?.signIn.firstFactorVerification.strategy === 'oauth_microsoft' ||
353+
SignUp.clerk.client?.signIn.firstFactorVerification.strategy === 'oauth_apple')
354+
) {
355+
return true;
356+
}
357+
358+
return false;
359+
}
327360
}

packages/expo/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## 0.20.26
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`9c499ea78`](https://github.com/clerk/javascript/commit/9c499ea787af67bb0a3e0b02c8001145df81308b)]:
8+
- @clerk/clerk-js@4.73.4
9+
310
## 0.20.25
411

512
### Patch Changes

packages/expo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clerk/clerk-expo",
3-
"version": "0.20.25",
3+
"version": "0.20.26",
44
"description": "Clerk React Native/Expo library",
55
"keywords": [
66
"react",
@@ -39,7 +39,7 @@
3939
"publish:local": "npx yalc push --replace --sig"
4040
},
4141
"dependencies": {
42-
"@clerk/clerk-js": "4.73.3",
42+
"@clerk/clerk-js": "4.73.4",
4343
"@clerk/clerk-react": "4.32.2",
4444
"@clerk/shared": "1.4.1",
4545
"base-64": "1.0.0",

0 commit comments

Comments
 (0)