Skip to content

Commit d332b79

Browse files
authoredFeb 3, 2025··
feat(nextjs): Enable Keyless by default (#4898)
1 parent 573ed86 commit d332b79

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
 

‎.changeset/new-lemons-try.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/nextjs': minor
3+
---
4+
5+
Enable Keyless by default. To disable keyless use `NEXT_PUBLIC_CLERK_KEYLESS_DISABLED=1`.

‎packages/nextjs/src/server/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export const SDK_METADATA = {
2222
export const TELEMETRY_DISABLED = isTruthy(process.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED);
2323
export const TELEMETRY_DEBUG = isTruthy(process.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG);
2424

25-
export const ENABLE_KEYLESS = isTruthy(process.env.NEXT_PUBLIC_CLERK_ENABLE_KEYLESS);
25+
export const KEYLESS_DISABLED = isTruthy(process.env.NEXT_PUBLIC_CLERK_KEYLESS_DISABLED) || false;
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { isDevelopmentEnvironment } from '@clerk/shared/utils';
22

3-
import { ENABLE_KEYLESS } from '../server/constants';
3+
import { KEYLESS_DISABLED } from '../server/constants';
44
import { isNextWithUnstableServerActions } from './sdk-versions';
55

66
const canUseKeyless =
77
!isNextWithUnstableServerActions &&
88
// Next.js will inline the value of 'development' or 'production' on the client bundle, so this is client-safe.
99
isDevelopmentEnvironment() &&
10-
ENABLE_KEYLESS;
10+
!KEYLESS_DISABLED;
1111

1212
export { canUseKeyless };

0 commit comments

Comments
 (0)
Please sign in to comment.