Skip to content

Commit aa8ceb3

Browse files
panteliselefwobsoriano
authored andcommitted
feat(nextjs): Enable Keyless by default (#4898)
1 parent 9b23a3e commit aa8ceb3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/new-lemons-try.md

Lines changed: 5 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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;
Lines changed: 2 additions & 2 deletions
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)