-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fraud protection improvements (#4614)
- Loading branch information
1 parent
ea9e6b4
commit 273d16c
Showing
9 changed files
with
81 additions
and
159 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 | ||
--- | ||
|
||
Inject captcha token into every X heartbeats |
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
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 |
---|---|---|
@@ -1,14 +1,4 @@ | ||
import { getHCaptchaToken } from './hcaptcha'; | ||
import { getTurnstileToken } from './turnstile'; | ||
import type { CaptchaOptions, GetCaptchaTokenReturn } from './types'; | ||
import type { CaptchaOptions } from './types'; | ||
|
||
/* | ||
* This is a temporary solution to test different captcha providers, until we decide on a single one. | ||
*/ | ||
export const getCaptchaToken = (opts: CaptchaOptions): Promise<GetCaptchaTokenReturn> => { | ||
if (opts.captchaProvider === 'hcaptcha') { | ||
return getHCaptchaToken(opts); | ||
} else { | ||
return getTurnstileToken(opts); | ||
} | ||
}; | ||
export const getCaptchaToken = (opts: CaptchaOptions) => getTurnstileToken(opts); |
This file was deleted.
Oops, something went wrong.
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