Skip to content

Commit

Permalink
fix: use AUTH0 if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Sep 20, 2023
1 parent 0bfcd11 commit 2075836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/lib/authOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2075836

Please sign in to comment.