Skip to content

feat(clerk-js): Add nonce to theme provider - #4509

Merged
jescalan merged 4 commits into
mainfrom
je.nonce-style
Nov 22, 2024
Merged

feat(clerk-js): Add nonce to theme provider#4509
jescalan merged 4 commits into
mainfrom
je.nonce-style

Conversation

@jescalan

@jescalan jescalan commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

Description

If using a strict-dynamic CSP with Clerk, you still currently need to add unsafe-inline to the style-src property since we do not thread the nonce into the emotion cache. This change will make it such that you can run the nonce into style-src instead of unsafe-inline and it will work, which means there are no unsafe properties required to be passed for strict dynamic policies when using Clerk in production.

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:

@changeset-bot

changeset-bot Bot commented Nov 6, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f10d02d

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

@jacekradko jacekradko 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.

@jescalan The changes look good. Thanks!

@vercel

vercel Bot commented Nov 22, 2024

Copy link
Copy Markdown

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 Nov 22, 2024 2:13pm

@jescalan
jescalan merged commit 7c27b0c into main Nov 22, 2024
@jescalan
jescalan deleted the je.nonce-style branch November 22, 2024 16:34
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
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.

3 participants