Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nextjs): Enable Keyless by default #4898

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d94e285
feat(nextjs): Enable Keyless by default
panteliselef Jan 15, 2025
7dfc740
changeset
panteliselef Jan 15, 2025
04896d1
Merge branch 'refs/heads/main' into elef/actls-50-cut-clerknextjskeyl…
panteliselef Jan 15, 2025
db00ff5
Merge branch 'refs/heads/main' into elef/actls-50-cut-clerknextjskeyl…
panteliselef Jan 17, 2025
9b51232
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 21, 2025
b77b222
hardcoded js version
panteliselef Jan 21, 2025
0a13eb3
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 21, 2025
78a0caa
update snapshot
panteliselef Jan 21, 2025
52e90b0
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 22, 2025
67bca1c
update snapshot
panteliselef Jan 22, 2025
cf7d72c
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 23, 2025
63b9309
improve error messages
panteliselef Jan 23, 2025
1d6f88e
feat(nextjs): Mark keyless onboarding as complete when stored keys ma…
panteliselef Jan 22, 2025
357e0c4
fix from merge
panteliselef Jan 23, 2025
d3a75e5
update snapshot
panteliselef Jan 23, 2025
fedb8eb
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 24, 2025
2dd1854
update snapshot
panteliselef Jan 24, 2025
ad6a0a5
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 30, 2025
26a1a2f
back to normal
panteliselef Jan 30, 2025
9b294e1
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Jan 31, 2025
c5b7972
Merge branch 'main' into elef/actls-50-cut-clerknextjskeyless-with-ke…
panteliselef Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/new-lemons-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/nextjs': minor
---

Enable Keyless by default. To disable keyless use `NEXT_PUBLIC_CLERK_KEYLESS_DISABLED=1`.
2 changes: 1 addition & 1 deletion packages/nextjs/src/server/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export const SDK_METADATA = {
export const TELEMETRY_DISABLED = isTruthy(process.env.NEXT_PUBLIC_CLERK_TELEMETRY_DISABLED);
export const TELEMETRY_DEBUG = isTruthy(process.env.NEXT_PUBLIC_CLERK_TELEMETRY_DEBUG);

export const ENABLE_KEYLESS = isTruthy(process.env.NEXT_PUBLIC_CLERK_ENABLE_KEYLESS);
export const KEYLESS_DISABLED = isTruthy(process.env.NEXT_PUBLIC_CLERK_KEYLESS_DISABLED) || false;
4 changes: 2 additions & 2 deletions packages/nextjs/src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { isDevelopmentEnvironment } from '@clerk/shared/utils';

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

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

export { canUseKeyless };