-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nextjs): Enable Keyless by default (#4898)
- Loading branch information
1 parent
9b23a3e
commit aa8ceb3
Showing
3 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; |