diff --git a/Dockerfile b/Dockerfile index 5433642..2126147 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -ARG NODE_ENV stage +ARG NODE_ENV production # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry during the build. @@ -29,7 +29,7 @@ RUN npm run build FROM node:18.12.0-alpine AS runner WORKDIR /app -ARG NODE_ENV stage +ARG NODE_ENV production # Uncomment the following line in case you want to disable telemetry during runtime. # ENV NEXT_TELEMETRY_DISABLED 1 diff --git a/src/lib/authOptions.ts b/src/lib/authOptions.ts index 2c2bf13..21a037a 100644 --- a/src/lib/authOptions.ts +++ b/src/lib/authOptions.ts @@ -28,7 +28,8 @@ export const authOptions: NextAuthOptions = { clientSecret: process.env.AZURE_AD_CLIENT_SECRET as string, tenantId: process.env.AZURE_AD_TENANT_ID as string, }), - process.env.NODE_ENV !== 'production' && + typeof process.env.AUTH0_CLIENT_ID === 'string' && + process.env.AUTH0_CLIENT_ID !== '' && (Auth0Provider({ clientId: process.env.AUTH0_CLIENT_ID as string, clientSecret: process.env.AUTH0_CLIENT_SECRET as string,