megachangelog
Improvement7.8.0

@clerk/nextjs: Missing Clerk keys now throw error instead of enabling keyless mode

Missing Clerk authentication keys (NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY) now throw an error directing developers to run npx clerk@latest init, instead of silently activating keyless mode. This improves development experience by making configuration requirements explicit. Existing apps with configured keys are unaffected.

Minor Changes

  • In development, missing Clerk keys no longer activate keyless mode. When NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY are not set, the SDK now throws an error directing you to run npx clerk@latest init, which provisions a Clerk application and writes the keys to .env.local. Keyless credentials stored in the development keyless cookie are no longer read. Existing apps with configured or claimed keys are unaffected. (#9493) by @djgould

Patch Changes

  • Updated dependencies [ea8cb05, f541dbf]:
    • @clerk/shared@4.29.3
    • @clerk/backend@3.16.10
    • @clerk/react@6.14.5
nextjsautherror-handlingdeveloper-experience

Source: original entry ↗