Repository navigation
feat(mosaic): add the Captcha element for clerk-js Turnstile - #10796
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: e678480 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
71f9eaf to
7d17759
Compare
|


Description
https://swingset-wox26j1v3.clerkstage.dev/components/captcha
Adds
Captcha, the element clerk-js renders Cloudflare Turnstile into when a sign-in or sign-up requires a CAPTCHA. Mosaic's sign-in, sign-up and waitlist need it so that an interactive challenge has somewhere to show; without the element, clerk-js falls back to an invisible widget.div#clerk-captcha(CAPTCHA_ELEMENT_ID) with the.cl-captchaslot class.theme,sizeandlanguagebecome thedata-cl-theme,data-cl-sizeanddata-cl-languageattributes clerk-js passes to Turnstile, with the types ofappearance.captcha.styleand no children, so React leaves the inline styles anddata-cl-interactivethat clerk-js sets during a challenge alone. Legacy'sCaptchaElementneeds aMutationObserverfor this.theme, it matches thecolor-schemeit renders in:dark,light(also when none is set, since Mosaic renders light there), orautoforlight dark. Legacy always usesauto, which follows the visitor's OS rather than the surrounding components.Captchaand expands it the way clerk-js does.The sign-in identifier step uses it in #10792, which stacks on this.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code