From 7715db40296670ff6a4b0791e639a6231c9a8fc2 Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Sun, 22 Jun 2025 02:49:10 +0200 Subject: [PATCH] add nextauth_url env var make sure the oauth callback knows where to go --- env.example | 1 + src/app/lib/auth.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/env.example b/env.example index 2808150..aede4a6 100644 --- a/env.example +++ b/env.example @@ -1,6 +1,7 @@ DISCORD_CLIENT_ID= DISCORD_CLIENT_SECRET= NEXTAUTH_SECRET= +NEXTAUTH_URL= DISCORD_GUILD_ID= DISCORD_REQUIRED_ROLE_ID= DISCORD_BOT_TOKEN= \ No newline at end of file diff --git a/src/app/lib/auth.ts b/src/app/lib/auth.ts index 91259a2..b8d5b72 100644 --- a/src/app/lib/auth.ts +++ b/src/app/lib/auth.ts @@ -39,4 +39,7 @@ export const authOptions: NextAuthOptions = { error: "/auth/error", }, secret: process.env.NEXTAUTH_SECRET, + ...(process.env.NEXTAUTH_URL && { + url: process.env.NEXTAUTH_URL, + }), };