-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Remove NEXT_AUTH references #681
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
Changes from all commits
e4e4324
cf25fc4
9c0a99f
71b4915
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,10 +18,8 @@ export const env = createEnv({ | |
| NODE_ENV: z.enum(["development", "production", "test"]), | ||
| DATABASE_URL: z.string().url(), | ||
|
|
||
| NEXTAUTH_SECRET: z.string().min(1), | ||
| NEXTAUTH_URL: z.string().optional(), | ||
| AUTH_TRUST_HOST: z.coerce.boolean().optional(), | ||
|
|
||
| AUTH_SECRET: z.string().optional(), | ||
| NEXTAUTH_SECRET: z.string().optional(), | ||
| GOOGLE_CLIENT_ID: z.string().min(1), | ||
| GOOGLE_CLIENT_SECRET: z.string().min(1), | ||
| MICROSOFT_CLIENT_ID: z.string().optional(), | ||
|
|
@@ -225,3 +223,9 @@ export const env = createEnv({ | |
| NEXT_PUBLIC_DUB_REFER_DOMAIN: process.env.NEXT_PUBLIC_DUB_REFER_DOMAIN, | ||
| }, | ||
| }); | ||
|
|
||
| if (!env.AUTH_SECRET && !env.NEXTAUTH_SECRET) { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this check here as zod refine won't work for |
||
| throw new Error( | ||
| "Either AUTH_SECRET or NEXTAUTH_SECRET environment variable must be defined", | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,8 +34,7 @@ ENV NODE_ENV=production | |
| # Provide dummy build-time ENV VARS (Still needed for build) | ||
| ENV DATABASE_URL="postgresql://dummy:dummy@dummy:5432/dummy?schema=public" | ||
| ENV DIRECT_URL="postgresql://dummy:dummy@dummy:5432/dummy?schema=public" | ||
| ENV NEXTAUTH_SECRET="dummy_secret_for_build_only" | ||
| ENV NEXTAUTH_URL="http://localhost:3000" | ||
| ENV AUTH_SECRET="dummy_secret_for_build_only" | ||
edulelis marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security control: Docker Scan Secrets Passed Via Passing secrets via Severity: CRITICAL Jit Bot commands and options (e.g., ignore issue)You can trigger Jit actions by commenting on this PR review:
|
||
| ENV GOOGLE_CLIENT_ID="dummy_id_for_build_only" | ||
| ENV GOOGLE_CLIENT_SECRET="dummy_secret_for_build_only" | ||
| ENV EMAIL_ENCRYPT_SECRET="dummy_encrypt_secret_for_build_only" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| "DATABASE_URL", | ||
| "DIRECT_URL", | ||
| "NEXTAUTH_SECRET", | ||
| "NEXTAUTH_URL", | ||
| "AUTH_SECRET", | ||
|
Comment on lines
10
to
+11
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should both these vars stay here? |
||
|
|
||
| "GOOGLE_CLIENT_ID", | ||
| "GOOGLE_CLIENT_SECRET", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.