Skip to content

feat(clerk-js): Support different CAPTCHA widget types - #3154

Merged
anagstef merged 5 commits into
mainfrom
stefanos/core-1988-poc-with-interactive-turnstile-widget-on-sign-up-component
Apr 11, 2024
Merged

feat(clerk-js): Support different CAPTCHA widget types#3154
anagstef merged 5 commits into
mainfrom
stefanos/core-1988-poc-with-interactive-turnstile-widget-on-sign-up-component

Conversation

@anagstef

@anagstef anagstef commented Apr 9, 2024

Copy link
Copy Markdown
Contributor

Description

This PR adds support for different CAPTCHA widgets coming from the FAPI.

Current behavior:

Currently, we support only an invisible captcha widget. This widget gets rendered in an injected div element at the end of the document body.

After this PR:

For backward compatibility, we will support the previous functionality when the user has selected the "invisible" widget. This is the setting to which all current users will be migrated.

This PR adds support for a visible challenge if needed on sign-up. This challenge gets rendered on the <div id="clerk-captcha" /> element in the SignUp form.

Users with custom sign-up flows must have the <div id="clerk-captcha" /> element inside their DOM when calling the signUp.create function.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@anagstef anagstef self-assigned this Apr 9, 2024
@changeset-bot

changeset-bot Bot commented Apr 9, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 59fe612

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@clerk/clerk-js Minor
@clerk/types Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/backend Patch
@clerk/express Patch
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/themes Patch

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

@nikosdouvlis
nikosdouvlis marked this pull request as draft April 10, 2024 08:48
@anagstef
anagstef force-pushed the stefanos/core-1988-poc-with-interactive-turnstile-widget-on-sign-up-component branch from 6ac98e8 to d187452 Compare April 10, 2024 11:57
@anagstef
anagstef marked this pull request as ready for review April 10, 2024 12:09
@brkalow

brkalow commented Apr 10, 2024

Copy link
Copy Markdown
Member

@anagstef can this be styled by consumers? If yes, how will we support that?

@anagstef
anagstef force-pushed the stefanos/core-1988-poc-with-interactive-turnstile-widget-on-sign-up-component branch from f199302 to b87c910 Compare April 10, 2024 15:18
@anagstef

Copy link
Copy Markdown
Contributor Author

@brkalow it can receive a theme between light and dark, a locale, and a size property. Currently, all of these default to auto which gets data from the browser. We can expose these variables through the appearance prop, at a later time.

@panteliselef panteliselef left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@anagstef
anagstef enabled auto-merge (squash) April 11, 2024 10:09
@anagstef
anagstef merged commit 0699fa4 into main Apr 11, 2024
@anagstef
anagstef deleted the stefanos/core-1988-poc-with-interactive-turnstile-widget-on-sign-up-component branch April 11, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants