From 2eda464fec8446a0986fe9e47a8edc0f42dd3c5e Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Tue, 20 Dec 2022 16:34:19 +0900 Subject: [PATCH] Dropping the fixed verification token until that's more stable --- website/src/pages/api/auth/[...nextauth].ts | 40 +++++++-------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/website/src/pages/api/auth/[...nextauth].ts b/website/src/pages/api/auth/[...nextauth].ts index c62492fe..6b2c0ae7 100644 --- a/website/src/pages/api/auth/[...nextauth].ts +++ b/website/src/pages/api/auth/[...nextauth].ts @@ -8,35 +8,19 @@ import prisma from "src/lib/prismadb"; const providers = []; // Register an email magic link auth method. -if (process.env.NODE_ENV === "production") { - providers.push( - EmailProvider({ - server: { - host: process.env.EMAIL_SERVER_HOST, - port: process.env.EMAIL_SERVER_PORT, - auth: { - user: process.env.EMAIL_SERVER_USER, - pass: process.env.EMAIL_SERVER_PASSWORD, - }, +providers.push( + EmailProvider({ + server: { + host: process.env.EMAIL_SERVER_HOST, + port: process.env.EMAIL_SERVER_PORT, + auth: { + user: process.env.EMAIL_SERVER_USER, + pass: process.env.EMAIL_SERVER_PASSWORD, }, - from: process.env.EMAIL_FROM, - }) - ); -} else { - // Register an email magic link auth method. - providers.push( - EmailProvider({ - server: { - host: process.env.EMAIL_SERVER_HOST, - port: process.env.EMAIL_SERVER_PORT, - }, - from: process.env.EMAIL_FROM, - async generateVerificationToken() { - return "1234"; - }, - }) - ); -} + }, + from: process.env.EMAIL_FROM, + }) +); if (process.env.DISCORD_CLIENT_ID) { providers.push(