add jwt secret token to env

This commit is contained in:
Brandon Egger 2023-05-18 20:30:46 -05:00
parent 165ddf8dd9
commit 24b342a06f
2 changed files with 3 additions and 3 deletions

View File

@ -11,6 +11,7 @@
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
# NEXTAUTH_SECRET=""
# JWT_SECRET=""
NEXTAUTH_URL="http://localhost:3000"
# MongoDB Details

View File

@ -18,6 +18,7 @@ const server = z.object({
// VERCEL_URL doesn't include `https` so it cant be validated as a URL
process.env.VERCEL ? z.string().min(1) : z.string().url()
),
JWT_SECRET: z.string().min(1),
});
/**
@ -39,9 +40,7 @@ const processEnv = {
NODE_ENV: process.env.NODE_ENV,
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
DISCORD_CLIENT_ID: process.env.DISCORD_CLIENT_ID,
DISCORD_CLIENT_SECRET: process.env.DISCORD_CLIENT_SECRET,
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
JWT_SECRET: process.env.JWT_SECRET,
};
// Don't touch the part below