Skip to content

fix(clerk-js): Add nonce to captcha script element #6226

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

Merged
merged 12 commits into from
Jul 8, 2025

Conversation

jacekradko
Copy link
Member

@jacekradko jacekradko commented Jun 30, 2025

Description

Adds Content Security Policy (CSP) nonce support to the Cloudflare Turnstile
script loading to prevent CSP violations in applications using nonce-based
CSP policies.

Changes:

  • Add optional nonce field to CaptchaOptions type
  • Thread nonce parameter through turnstile loading chain
  • Extract nonce from Clerk options in retrieveCaptchaInfo()
  • Pass nonce to loadScript() for proper CSP compliance

The nonce is automatically retrieved from the Clerk instance options when
available (e.g., from Next.js CSP headers), maintaining backward compatibility
with existing implementations.

Fixes CSP violations when using Turnstile with strict-dynamic policies.

Fixes: USER-2295

Checklist

  • pnpm test runs as expected.
  • pnpm 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:

Summary by CodeRabbit

  • New Features

    • Added support for passing a nonce value when loading CAPTCHA scripts, improving compatibility with strict Content Security Policies (CSP).
    • Enhanced CAPTCHA options with new fields, including nonce and closeModal, for greater flexibility.
  • Refactor

    • Reordered and updated CAPTCHA option properties for improved clarity and extensibility.
  • Tests

    • Introduced comprehensive tests to verify nonce handling in CAPTCHA functionality and options.

Copy link

changeset-bot bot commented Jun 30, 2025

🦋 Changeset detected

Latest commit: 94c6dc9

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

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo 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

Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:37pm

Copy link
Contributor

coderabbitai bot commented Jun 30, 2025

📝 Walkthrough

"""

Walkthrough

The changes introduce support for passing a Content Security Policy (CSP) nonce to the Cloudflare Turnstile CAPTCHA script loader in the Clerk JS package. The CaptchaOptions type is updated to include an optional nonce field, and this value is extracted and propagated through the CAPTCHA challenge utilities and script loading functions. The nonce is retrieved from the Clerk object, provided in the CAPTCHA options, and ultimately applied as an attribute when loading the CAPTCHA script, enabling CSP compliance. No public API signatures are broken, only extended.

Assessment against linked issues

Objective Addressed Explanation
Add support for passing a nonce attribute to the Turnstile CAPTCHA script tag (USER-2295)

Suggested labels

clerk-js

Suggested reviewers

  • aeliox
  • panteliselef
    """

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38d2d7a and c3c0235.

📒 Files selected for processing (1)
  • .changeset/witty-parks-attack.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/witty-parks-attack.md
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts (1)

16-16: Remove redundant fallback logic.

The || undefined is redundant since nonce is already typed as string | undefined.

-    nonce: nonce || undefined,
+    nonce,
packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts (1)

22-22: Simplify nonce precedence logic.

The precedence logic can be simplified since both opts?.nonce and nonce are already string | undefined.

-        nonce: opts?.nonce || nonce || undefined,
+        nonce: opts?.nonce || nonce,
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between baac817 and f4d5b92.

📒 Files selected for processing (4)
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts (2 hunks)
  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts (1 hunks)
  • packages/clerk-js/src/utils/captcha/turnstile.ts (2 hunks)
  • packages/clerk-js/src/utils/captcha/types.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`**/*.{js,jsx,ts,tsx}`: All code must pass ESLint checks with the project's conf...

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Use Prettier for consistent code formatting
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Validate all inputs and sanitize outputs
Implement proper logging with different levels

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
`packages/**/*.ts`: TypeScript is required for all packages

packages/**/*.ts: TypeScript is required for all packages

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
`packages/**/*.{ts,tsx,d.ts}`: Packages should export TypeScript types alongside runtime code

packages/**/*.{ts,tsx,d.ts}: Packages should export TypeScript types alongside runtime code

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
`**/*.{ts,tsx}`: Use proper TypeScript error types

**/*.{ts,tsx}: Use proper TypeScript error types

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
`packages/{clerk-js,elements,themes}/**/*`: Visual regression testing should be performed for UI components.

packages/{clerk-js,elements,themes}/**/*: Visual regression testing should be performed for UI components.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
`**/*.{ts,tsx}`: Always define explicit return types for functions, especially p...

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document public functions and APIs with JSDoc-style comments including @param, @returns, @throws, and @example
Define custom error classes for domain-specific errors
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining and nullish coalescing for safe property access
Let TypeScript infer types when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use readonly arrays and objects for immutability
Use immutable update patterns (spread, etc.) for objects and arrays
Use lazy loading for large types
Prefer unknown over any for performance
Use type-only imports: import type { ... }
Use branded types for domain safety
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints in TypeScript generics
No unused type parameters in generics
Proper use of utility types instead of manual type construction
Type-only imports where possible for performance
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts
  • packages/clerk-js/src/utils/captcha/types.ts
  • packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts
  • packages/clerk-js/src/utils/captcha/turnstile.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: dstaley
PR: clerk/javascript#6116
File: .changeset/tangy-garlics-say.md:1-2
Timestamp: 2025-06-13T16:09:53.061Z
Learning: In the Clerk JavaScript repository, contributors create intentionally empty changeset files (containing only the YAML delimiters) when a PR touches only non-published parts of the codebase (e.g., sandbox assets). This signals that no package release is required, so such changesets should not be flagged as missing content.
🧬 Code Graph Analysis (2)
packages/clerk-js/src/utils/captcha/types.ts (1)
packages/types/src/displayConfig.ts (2)
  • CaptchaProvider (8-8)
  • CaptchaWidgetType (7-7)
packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts (2)
packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts (1)
  • retrieveCaptchaInfo (3-18)
packages/clerk-js/src/utils/captcha/getCaptchaToken.ts (1)
  • getCaptchaToken (4-10)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
packages/clerk-js/src/utils/captcha/retrieveCaptchaInfo.ts (1)

7-8: Type casting is appropriately documented.

The use of any casting is well-documented and necessary to access internal options. The optional chaining provides safety against undefined methods.

packages/clerk-js/src/utils/captcha/types.ts (1)

4-14: CaptchaOptions extension looks good.

The addition of optional nonce and closeModal properties maintains backward compatibility while extending functionality. Property reordering doesn't affect functionality.

packages/clerk-js/src/utils/captcha/CaptchaChallenge.ts (1)

15-15: Nonce integration implemented correctly.

The nonce extraction and propagation through both challenge methods is properly implemented, maintaining the existing error handling and control flow.

Also applies to: 46-47, 53-53

packages/clerk-js/src/utils/captcha/turnstile.ts (3)

29-29: Function signatures correctly updated for nonce support.

The optional nonce parameters maintain backward compatibility while enabling CSP nonce propagation.

Also applies to: 39-39


74-76: Nonce extraction and propagation implemented correctly.

The nonce is properly extracted from options and passed through the loading chain to enable CSP compliance.


45-45: Manual verification needed: Confirm nonce support in loadScript

I wasn't able to locate the implementation of loadScript in the repository. Please ensure that the loadScript function in @clerk/shared/loadScript defines its options parameter to include a nonce?: string property. Without this, passing nonce at runtime may cause errors.

• Verify in packages/shared/src/loadScript.ts (or the correct source file) that the options interface or function signature lists nonce as an accepted field.

Copy link

pkg-pr-new bot commented Jun 30, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6226

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6226

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6226

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6226

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6226

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6226

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6226

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6226

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6226

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6226

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6226

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6226

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6226

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6226

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6226

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6226

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6226

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6226

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6226

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6226

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6226

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6226

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6226

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6226

commit: 94c6dc9

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.changeset/witty-parks-attack.md (1)

5-6: Complete the changeset description.

The description appears to be cut off mid-sentence. Please complete the description to clearly document what CSP nonce support was added.

-Adds Content Security Policy (CSP) nonce support to the Cloudflare Turnstile
+Adds Content Security Policy (CSP) nonce support to the Cloudflare Turnstile captcha script loading to prevent CSP violations in applications with nonce-based policies
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4d5b92 and 91a9dd0.

📒 Files selected for processing (2)
  • .changeset/witty-parks-attack.md (1 hunks)
  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
`**/*.{js,jsx,ts,tsx}`: All code must pass ESLint checks with the project's conf...

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Use Prettier for consistent code formatting
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Validate all inputs and sanitize outputs
Implement proper logging with different levels

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/**/*.ts`: TypeScript is required for all packages

packages/**/*.ts: TypeScript is required for all packages

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/{__tests__,**/__tests__}/**/*.{js,jsx,ts,tsx}`: Test files should be co-located with source files or in `__tests__` directories

**/{__tests__,**/__tests__}/**/*.{js,jsx,ts,tsx}: Test files should be co-located with source files or in __tests__ directories

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/**/*.{ts,tsx,d.ts}`: Packages should export TypeScript types alongside runtime code

packages/**/*.{ts,tsx,d.ts}: Packages should export TypeScript types alongside runtime code

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{ts,tsx}`: Use proper TypeScript error types

**/*.{ts,tsx}: Use proper TypeScript error types

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{test,spec}.{js,ts,tsx}`: Unit tests should use Jest or Vitest as the test runner.

**/*.{test,spec}.{js,ts,tsx}: Unit tests should use Jest or Vitest as the test runner.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/{clerk-js,elements,themes}/**/*`: Visual regression testing should be performed for UI components.

packages/{clerk-js,elements,themes}/**/*: Visual regression testing should be performed for UI components.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{ts,tsx}`: Always define explicit return types for functions, especially p...

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document public functions and APIs with JSDoc-style comments including @param, @returns, @throws, and @example
Define custom error classes for domain-specific errors
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining and nullish coalescing for safe property access
Let TypeScript infer types when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use readonly arrays and objects for immutability
Use immutable update patterns (spread, etc.) for objects and arrays
Use lazy loading for large types
Prefer unknown over any for performance
Use type-only imports: import type { ... }
Use branded types for domain safety
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints in TypeScript generics
No unused type parameters in generics
Proper use of utility types instead of manual type construction
Type-only imports where possible for performance
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/__tests__/**/*.{ts,tsx}`: Use Vitest for type-safe testing in TypeScript Cre...

**/__tests__/**/*.{ts,tsx}: Use Vitest for type-safe testing in TypeScript
Create type-safe test builders/factories
Use branded types for test isolation
Implement proper mock types that match interfaces in tests

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: dstaley
PR: clerk/javascript#6116
File: .changeset/tangy-garlics-say.md:1-2
Timestamp: 2025-06-13T16:09:53.061Z
Learning: In the Clerk JavaScript repository, contributors create intentionally empty changeset files (containing only the YAML delimiters) when a PR touches only non-published parts of the codebase (e.g., sandbox assets). This signals that no package release is required, so such changesets should not be flagged as missing content.
.changeset/witty-parks-attack.md (4)
Learnt from: dstaley
PR: clerk/javascript#6116
File: .changeset/tangy-garlics-say.md:1-2
Timestamp: 2025-06-13T16:09:53.061Z
Learning: In the Clerk JavaScript repository, contributors create intentionally empty changeset files (containing only the YAML delimiters) when a PR touches only non-published parts of the codebase (e.g., sandbox assets). This signals that no package release is required, so such changesets should not be flagged as missing content.
Learnt from: jacekradko
PR: clerk/javascript#5905
File: .changeset/six-ears-wash.md:1-3
Timestamp: 2025-06-26T03:27:05.535Z
Learning: In the Clerk JavaScript repository, changeset headers support single quotes syntax (e.g., '@clerk/backend': minor) and work fine with their current changesets integration, so there's no need to change them to double quotes.
Learnt from: dstaley
PR: clerk/javascript#6100
File: packages/clerk-js/src/ui/components/OAuthConsent/OAuthConsent.tsx:121-124
Timestamp: 2025-06-16T17:08:58.414Z
Learning: The @clerk/clerk-js package only supports browsers released in the last two years (since May 8, 2023), so modern CSS features like color-mix() are fully supported across all target browsers without requiring fallbacks.
Learnt from: wobsoriano
PR: clerk/javascript#6163
File: packages/backend/src/api/endpoints/APIKeysApi.ts:60-70
Timestamp: 2025-06-20T17:44:17.570Z
Learning: The Clerk codebase uses POST method for API key update operations instead of the typical PATCH method, as clarified by the maintainer wobsoriano.
packages/clerk-js/src/utils/__tests__/captcha.spec.ts (17)
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Use branded types for test isolation
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Include tests for all new features
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Create type-safe test builders/factories
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Implement proper mock types that match interfaces in tests
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test isolation
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to packages/clerk-react/**/*.{test,spec}.{js,ts,tsx} : Component testing should use React Testing Library.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to packages/{clerk-js,elements,themes}/**/* : Visual regression testing should be performed for UI components.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to integration/**/*.{test,spec}.{js,ts,tsx} : Integration tests should use Playwright as the test runner.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Use Jest for unit testing, Vitest for some packages
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Use Vitest for type-safe testing in TypeScript
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to **/*.{test,spec}.{js,ts,tsx} : Unit tests should use Jest or Vitest as the test runner.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test setup
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test assertions
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Integration tests using Playwright for E2E scenarios
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Use React Testing Library
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/global.mdc:0-0
Timestamp: 2025-06-30T10:30:13.397Z
Learning: Use pnpm test:integration:* to run framework-specific integration tests
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Test component interactions
🪛 ESLint
packages/clerk-js/src/utils/__tests__/captcha.spec.ts

[error] 117-117: import() type annotations are forbidden.

(@typescript-eslint/consistent-type-imports)


[error] 135-135: import() type annotations are forbidden.

(@typescript-eslint/consistent-type-imports)

⏰ Context from checks skipped due to timeout of 90000ms (23)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 13)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (tanstack-react-router, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Static analysis
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
packages/clerk-js/src/utils/__tests__/captcha.spec.ts (5)

27-251: Excellent comprehensive test coverage for nonce functionality.

The new test suite thoroughly covers all aspects of nonce support including edge cases, type compatibility, and integration scenarios. The use of dynamic imports and proper test isolation is commendable.


34-61: Well-structured test for nonce extraction from clerk options.

The test properly mocks the clerk instance and verifies both the nonce extraction and the function call. Good coverage of the happy path scenario.


88-111: Excellent edge case coverage for missing __internal_getOption method.

This test ensures graceful handling when the clerk instance doesn't have the internal method, which is important for backward compatibility.


180-195: Thorough integration test for invisible challenge with nonce.

The test properly verifies that the nonce from clerk options is passed through to the getCaptchaToken function with the correct parameters.


214-229: Good test for nonce precedence handling.

This test confirms that explicitly provided nonce values override the clerk options nonce, which is the expected behavior for flexibility.

@jacekradko jacekradko changed the title fix(clerk-js): add nonce to captcha script element fix(clerk-js): Add nonce to captcha script element Jun 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/clerk-js/src/utils/__tests__/captcha.spec.ts (1)

34-62: Improve mock type safety to reduce reliance on any type.

The test logic is sound and covers the nonce extraction scenario well. However, the mock clerk object uses as any type assertion which reduces type safety.

Consider creating a proper mock type or interface:

+interface MockClerk {
+  __unstable__environment: {
+    displayConfig: {
+      captchaProvider: string;
+      captchaPublicKey: string;
+      captchaWidgetType: string;
+      captchaPublicKeyInvisible: string;
+    };
+    userSettings: {
+      signUp: {
+        captcha_enabled: boolean;
+      };
+    };
+  };
+  isStandardBrowser: boolean;
+  __internal_getOption: ReturnType<typeof vi.fn>;
+}

-      const mockClerk = {
+      const mockClerk: MockClerk = {

This would eliminate the need for as any on line 56 and improve type safety throughout the test.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cccf960 and 38d2d7a.

📒 Files selected for processing (1)
  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
`**/*.{js,jsx,ts,tsx}`: All code must pass ESLint checks with the project's conf...

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Use Prettier for consistent code formatting
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Validate all inputs and sanitize outputs
Implement proper logging with different levels

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/**/*.ts`: TypeScript is required for all packages

packages/**/*.ts: TypeScript is required for all packages

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/{__tests__,**/__tests__}/**/*.{js,jsx,ts,tsx}`: Test files should be co-located with source files or in `__tests__` directories

**/{__tests__,**/__tests__}/**/*.{js,jsx,ts,tsx}: Test files should be co-located with source files or in __tests__ directories

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/**/*.{ts,tsx,d.ts}`: Packages should export TypeScript types alongside runtime code

packages/**/*.{ts,tsx,d.ts}: Packages should export TypeScript types alongside runtime code

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{ts,tsx}`: Use proper TypeScript error types

**/*.{ts,tsx}: Use proper TypeScript error types

📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{test,spec}.{js,ts,tsx}`: Unit tests should use Jest or Vitest as the test runner.

**/*.{test,spec}.{js,ts,tsx}: Unit tests should use Jest or Vitest as the test runner.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`packages/{clerk-js,elements,themes}/**/*`: Visual regression testing should be performed for UI components.

packages/{clerk-js,elements,themes}/**/*: Visual regression testing should be performed for UI components.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/*.{ts,tsx}`: Always define explicit return types for functions, especially p...

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document public functions and APIs with JSDoc-style comments including @param, @returns, @throws, and @example
Define custom error classes for domain-specific errors
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining and nullish coalescing for safe property access
Let TypeScript infer types when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use readonly arrays and objects for immutability
Use immutable update patterns (spread, etc.) for objects and arrays
Use lazy loading for large types
Prefer unknown over any for performance
Use type-only imports: import type { ... }
Use branded types for domain safety
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints in TypeScript generics
No unused type parameters in generics
Proper use of utility types instead of manual type construction
Type-only imports where possible for performance
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
`**/__tests__/**/*.{ts,tsx}`: Use Vitest for type-safe testing in TypeScript Cre...

**/__tests__/**/*.{ts,tsx}: Use Vitest for type-safe testing in TypeScript
Create type-safe test builders/factories
Use branded types for test isolation
Implement proper mock types that match interfaces in tests

📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

List of files the instruction was applied to:

  • packages/clerk-js/src/utils/__tests__/captcha.spec.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: dstaley
PR: clerk/javascript#6116
File: .changeset/tangy-garlics-say.md:1-2
Timestamp: 2025-06-13T16:09:53.061Z
Learning: In the Clerk JavaScript repository, contributors create intentionally empty changeset files (containing only the YAML delimiters) when a PR touches only non-published parts of the codebase (e.g., sandbox assets). This signals that no package release is required, so such changesets should not be flagged as missing content.
packages/clerk-js/src/utils/__tests__/captcha.spec.ts (24)
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Use branded types for test isolation
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Include tests for all new features
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Implement proper mock types that match interfaces in tests
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Create type-safe test builders/factories
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test isolation
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to packages/clerk-react/**/*.{test,spec}.{js,ts,tsx} : Component testing should use React Testing Library.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to packages/{clerk-js,elements,themes}/**/* : Visual regression testing should be performed for UI components.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Use type-only imports: `import type { ... }`
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Use ES6 imports/exports consistently
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Type-only imports where possible for performance
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.tsx : Use proper type definitions for props and state
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Proper use of utility types instead of manual type construction
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Use proper type annotations for variables and parameters where inference isn't clear
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.tsx : Use proper type guards for conditional rendering
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/*.{ts,tsx} : Use `const assertions` for literal types: `as const`
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/typescript.mdc:0-0
Timestamp: 2025-06-30T10:33:45.961Z
Learning: Applies to **/__tests__/**/*.{ts,tsx} : Use Vitest for type-safe testing in TypeScript
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Use proper test data
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Use Jest for unit testing, Vitest for some packages
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to **/*.{test,spec}.{js,ts,tsx} : Unit tests should use Jest or Vitest as the test runner.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test assertions
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Implement proper test setup
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/react.mdc:0-0
Timestamp: 2025-06-30T10:32:37.848Z
Learning: Applies to **/*.test.{jsx,tsx} : Test component interactions
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-06-30T10:30:56.197Z
Learning: Applies to integration/**/*.{test,spec}.{js,ts,tsx} : Integration tests should use Playwright as the test runner.
Learnt from: CR
PR: clerk/javascript#0
File: .cursor/rules/development.mdc:0-0
Timestamp: 2025-06-30T10:29:42.997Z
Learning: Integration tests using Playwright for E2E scenarios
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
packages/clerk-js/src/utils/__tests__/captcha.spec.ts (6)

1-4: LGTM! Clean import structure following TypeScript guidelines.

The import statements correctly use type-only imports for the CaptchaOptions type, which aligns with the coding guidelines for performance and ESLint compliance.


115-147: Excellent type-level testing approach.

These compile-time tests effectively validate that the CaptchaOptions type correctly supports the optional nonce field. The approach of using TypeScript's type system to validate the interface is solid.


149-179: Well-structured test setup with proper mock isolation.

The beforeEach setup correctly uses vi.doMock for module mocking and provides a comprehensive mock clerk instance. The dynamic import strategy ensures proper test isolation.


181-196: Comprehensive nonce integration test with proper assertions.

The test effectively verifies that the nonce from clerk options is correctly passed through to getCaptchaToken. The use of expect.objectContaining allows for flexible assertion while ensuring the critical nonce field is validated.


215-230: Critical test case: validates nonce override behavior.

This test ensures that explicitly provided nonce values take precedence over clerk options, which is essential for API flexibility and user control.


232-251: Important edge case: graceful handling of missing nonce.

This test validates that the system handles undefined nonce values properly, ensuring backward compatibility and robust error handling.

@anagstef
Copy link
Member

anagstef commented Jul 7, 2025

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.1.5-snapshot.v20250707151720
@clerk/astro 2.10.2-snapshot.v20250707151720
@clerk/backend 2.4.0-snapshot.v20250707151720
@clerk/chrome-extension 2.5.3-snapshot.v20250707151720
@clerk/clerk-js 5.70.0-snapshot.v20250707151720
@clerk/elements 0.23.37-snapshot.v20250707151720
@clerk/clerk-expo 2.14.2-snapshot.v20250707151720
@clerk/expo-passkeys 0.3.14-snapshot.v20250707151720
@clerk/express 1.7.4-snapshot.v20250707151720
@clerk/fastify 2.4.4-snapshot.v20250707151720
@clerk/localizations 3.17.3-snapshot.v20250707151720
@clerk/nextjs 6.23.3-snapshot.v20250707151720
@clerk/nuxt 1.7.5-snapshot.v20250707151720
@clerk/clerk-react 5.32.4-snapshot.v20250707151720
@clerk/react-router 1.6.4-snapshot.v20250707151720
@clerk/remix 4.8.5-snapshot.v20250707151720
@clerk/shared 3.10.2-snapshot.v20250707151720
@clerk/tanstack-react-start 0.18.3-snapshot.v20250707151720
@clerk/testing 1.9.2-snapshot.v20250707151720
@clerk/themes 2.2.54-snapshot.v20250707151720
@clerk/types 4.63.0-snapshot.v20250707151720
@clerk/vue 1.8.12-snapshot.v20250707151720

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/agent-toolkit@0.1.5-snapshot.v20250707151720 --save-exact

@clerk/astro

npm i @clerk/astro@2.10.2-snapshot.v20250707151720 --save-exact

@clerk/backend

npm i @clerk/backend@2.4.0-snapshot.v20250707151720 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@2.5.3-snapshot.v20250707151720 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.70.0-snapshot.v20250707151720 --save-exact

@clerk/elements

npm i @clerk/elements@0.23.37-snapshot.v20250707151720 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.14.2-snapshot.v20250707151720 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@0.3.14-snapshot.v20250707151720 --save-exact

@clerk/express

npm i @clerk/express@1.7.4-snapshot.v20250707151720 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.4.4-snapshot.v20250707151720 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.17.3-snapshot.v20250707151720 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.23.3-snapshot.v20250707151720 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@1.7.5-snapshot.v20250707151720 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.32.4-snapshot.v20250707151720 --save-exact

@clerk/react-router

npm i @clerk/react-router@1.6.4-snapshot.v20250707151720 --save-exact

@clerk/remix

npm i @clerk/remix@4.8.5-snapshot.v20250707151720 --save-exact

@clerk/shared

npm i @clerk/shared@3.10.2-snapshot.v20250707151720 --save-exact

@clerk/tanstack-react-start

npm i @clerk/tanstack-react-start@0.18.3-snapshot.v20250707151720 --save-exact

@clerk/testing

npm i @clerk/testing@1.9.2-snapshot.v20250707151720 --save-exact

@clerk/themes

npm i @clerk/themes@2.2.54-snapshot.v20250707151720 --save-exact

@clerk/types

npm i @clerk/types@4.63.0-snapshot.v20250707151720 --save-exact

@clerk/vue

npm i @clerk/vue@1.8.12-snapshot.v20250707151720 --save-exact

@jacekradko jacekradko merged commit d34205c into main Jul 8, 2025
37 checks passed
@jacekradko jacekradko deleted the jr.fix/pass-nonce-to-captcha branch July 8, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy