Skip to content

chore(nextjs)!: Throw when missing encryption key#7360

Merged
nikosdouvlis merged 1 commit intovincent-and-the-doctorfrom
brk.chore/throw-on-missing-encryption-key
Dec 4, 2025
Merged

chore(nextjs)!: Throw when missing encryption key#7360
nikosdouvlis merged 1 commit intovincent-and-the-doctorfrom
brk.chore/throw-on-missing-encryption-key

Conversation

@brkalow
Copy link
Member

@brkalow brkalow commented Dec 3, 2025

Description

When passing a secret key at runtime to clerkMiddleware(), we need a stable encryption key to safely pass the value from the middleware to the application server. Previously, we avoided throwing an error to prevent a breaking change. Now that we're releasing a major, we are changing this to throw an error.

fixes USER-3057

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:

@brkalow brkalow requested a review from LauraBeatris December 3, 2025 20:57
@changeset-bot
Copy link

changeset-bot bot commented Dec 3, 2025

🦋 Changeset detected

Latest commit: 32e5469

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

This PR includes changesets to release 1 package
Name Type
@clerk/nextjs Major

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

@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Dec 3, 2025 8:57pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch brk.chore/throw-on-missing-encryption-key

Comment @coderabbitai help to get the list of available commands and usage tips.

@brkalow
Copy link
Member Author

brkalow commented Dec 3, 2025

!allow-major

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7360

@clerk/upgrade

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

@clerk/vue

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

commit: 32e5469

Copy link
Member

@LauraBeatris LauraBeatris left a comment

Choose a reason for hiding this comment

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

Thanks for that! 🫡

@nikosdouvlis nikosdouvlis merged commit f56b6b9 into vincent-and-the-doctor Dec 4, 2025
34 of 42 checks passed
@nikosdouvlis nikosdouvlis deleted the brk.chore/throw-on-missing-encryption-key branch December 4, 2025 08:28
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