-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(clerk-js): Deprecate experimental captcha from Clerk singleton (#…
- Loading branch information
1 parent
c8dfc3b
commit 9ca2157
Showing
5 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@clerk/clerk-js': patch | ||
'@clerk/types': patch | ||
--- | ||
|
||
Deprecate experimental captcha from Clerk singleton. |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type Clerk from '../core/clerk'; | ||
import createFapiClient from '../core/fapiClient'; | ||
|
||
export const retrieveCaptchaInfo = (clerk: Clerk) => { | ||
const _environment = clerk.__unstable__environment; | ||
const fapiClient = createFapiClient(clerk); | ||
return { | ||
captchaSiteKey: _environment ? _environment.displayConfig.captchaPublicKey : null, | ||
canUseCaptcha: _environment | ||
? _environment.userSettings.signUp.captcha_enabled && | ||
clerk.isStandardBrowser && | ||
clerk.instanceType === 'production' | ||
: null, | ||
captchaURL: fapiClient | ||
.buildUrl({ | ||
path: 'cloudflare/turnstile/v0/api.js', | ||
pathPrefix: '', | ||
search: '?render=explicit', | ||
}) | ||
.toString(), | ||
}; | ||
}; |
This file contains 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