-
Notifications
You must be signed in to change notification settings - Fork 205
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
feat(clerk-js): Add experimental support for hCaptcha #3422
Conversation
🦋 Changeset detectedLatest commit: 0dd731a The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!snapshot |
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.2.1-snapshot.v038cdae --save-exact
npm i @clerk/chrome-extension@1.0.14-snapshot.v038cdae --save-exact
npm i @clerk/clerk-js@5.6.0-snapshot.v038cdae --save-exact
npm i @clerk/elements@0.4.7-snapshot.v038cdae --save-exact
npm i @clerk/clerk-expo@1.1.6-snapshot.v038cdae --save-exact
npm i @clerk/express@0.0.10-snapshot.v038cdae --save-exact
npm i @clerk/fastify@1.0.11-snapshot.v038cdae --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.1.1-snapshot.v038cdae --save-exact
npm i @clerk/clerk-react@5.2.1-snapshot.v038cdae --save-exact
npm i @clerk/remix@4.0.12-snapshot.v038cdae --save-exact
npm i @clerk/clerk-sdk-node@5.0.9-snapshot.v038cdae --save-exact
npm i @clerk/shared@2.2.1-snapshot.v038cdae --save-exact
npm i @clerk/testing@1.1.4-snapshot.v038cdae --save-exact
npm i @clerk/themes@2.1.8-snapshot.v038cdae --save-exact
npm i @clerk/types@4.6.0-snapshot.v038cdae --save-exact |
!snapshot |
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/backend@1.2.1-snapshot.v25f7fe2 --save-exact
npm i @clerk/chrome-extension@1.0.14-snapshot.v25f7fe2 --save-exact
npm i @clerk/clerk-js@5.6.0-snapshot.v25f7fe2 --save-exact
npm i @clerk/elements@0.4.7-snapshot.v25f7fe2 --save-exact
npm i @clerk/clerk-expo@1.1.6-snapshot.v25f7fe2 --save-exact
npm i @clerk/express@0.0.10-snapshot.v25f7fe2 --save-exact
npm i @clerk/fastify@1.0.11-snapshot.v25f7fe2 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.1.1-snapshot.v25f7fe2 --save-exact
npm i @clerk/clerk-react@5.2.1-snapshot.v25f7fe2 --save-exact
npm i @clerk/remix@4.0.12-snapshot.v25f7fe2 --save-exact
npm i @clerk/clerk-sdk-node@5.0.9-snapshot.v25f7fe2 --save-exact
npm i @clerk/shared@2.2.1-snapshot.v25f7fe2 --save-exact
npm i @clerk/testing@1.1.4-snapshot.v25f7fe2 --save-exact
npm i @clerk/themes@2.1.8-snapshot.v25f7fe2 --save-exact
npm i @clerk/types@4.6.0-snapshot.v25f7fe2 --save-exact |
let retries = 0; | ||
const errorCodes: (string | number)[] = []; | ||
|
||
const handleCaptchaTokenGeneration = (): Promise<[string, string]> => { |
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.
❓ Can we extract parts from handleCaptchaTokenGeneration
to avoid duplicate code?
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.
These duplicated code fragments are temprary until we decide on the provider and will be removed soon. If we decide to provide multiple captcha providers, I will refactor the code, as you suggested!
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.
💯
!snapshot |
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/chrome-extension@1.0.15-snapshot.v84cdc13 --save-exact
npm i @clerk/clerk-js@5.5.2-snapshot.v84cdc13 --save-exact
npm i @clerk/elements@0.5.1-snapshot.v84cdc13 --save-exact
npm i @clerk/clerk-expo@1.1.7-snapshot.v84cdc13 --save-exact
npm i @clerk/fastify@1.0.12-snapshot.v84cdc13 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.1.3-snapshot.v84cdc13 --save-exact
npm i @clerk/clerk-react@5.2.2-snapshot.v84cdc13 --save-exact
npm i @clerk/remix@4.0.13-snapshot.v84cdc13 --save-exact
npm i @clerk/testing@1.1.5-snapshot.v84cdc13 --save-exact
npm i @clerk/themes@2.1.8-snapshot.v84cdc13 --save-exact
npm i @clerk/types@4.5.1-snapshot.v84cdc13 --save-exact |
!snapshot |
1 similar comment
!snapshot |
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/chrome-extension@1.0.16-snapshot.vf344f0c --save-exact
npm i @clerk/clerk-js@5.5.3-snapshot.vf344f0c --save-exact
npm i @clerk/elements@0.5.2-snapshot.vf344f0c --save-exact
npm i @clerk/clerk-expo@1.1.8-snapshot.vf344f0c --save-exact
npm i @clerk/fastify@1.0.12-snapshot.vf344f0c --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/nextjs@5.1.3-snapshot.vf344f0c --save-exact
npm i @clerk/clerk-react@5.2.2-snapshot.vf344f0c --save-exact
npm i @clerk/remix@4.0.13-snapshot.vf344f0c --save-exact
npm i @clerk/testing@1.1.5-snapshot.vf344f0c --save-exact
npm i @clerk/themes@2.1.8-snapshot.vf344f0c --save-exact
npm i @clerk/types@4.5.1-snapshot.vf344f0c --save-exact |
Description
This PR adds experimental support for hCaptcha alongside with Cloudflare Turnstile, for testing purposes.
The mechanism and logic used is exactly the same with Turnstile. There are duplicated fragments of code, but this is temporary thing.
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change