From 5af2762e1230ac183c7973af3c092d4a093185b4 Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 29 Apr 2023 19:18:55 +0000 Subject: [PATCH] Force dynamic on OAuth routes See https://github.com/vercel/next.js/discussions/48989. --- src/app/oauth/discord/login/route.ts | 2 ++ src/app/oauth/github/login/route.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/oauth/discord/login/route.ts b/src/app/oauth/discord/login/route.ts index e973d72..b59c1c3 100644 --- a/src/app/oauth/discord/login/route.ts +++ b/src/app/oauth/discord/login/route.ts @@ -1,6 +1,8 @@ import { DiscordAuthProvider } from "@/auth/discord"; import { v4 } from "uuid"; +export const dynamic = "force-dynamic"; + export async function GET(request: Request) { let url = `https://discord.com/oauth2/authorize`; let state = v4(); diff --git a/src/app/oauth/github/login/route.ts b/src/app/oauth/github/login/route.ts index 312704a..26f30f0 100644 --- a/src/app/oauth/github/login/route.ts +++ b/src/app/oauth/github/login/route.ts @@ -1,6 +1,8 @@ import { GitHubAuthProvider } from "@/auth/github"; import { v4 } from "uuid"; +export const dynamic = "force-dynamic"; + export async function GET(request: Request) { let url = `https://github.com/login/oauth/authorize`; let state = v4();