From 11d3fe70ed4c4cbb8d044ca850870f8915dd3dc5 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 21 Feb 2025 19:30:00 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20de=20l'URL=20de=20r=C3=A9cup=C3=A9?= =?UTF-8?q?ration=20du=20token=20dans=20la=20configuration=20de=20NextAuth?= =?UTF-8?q?=20pour=20inclure=20le=20royaume=20Keycloak.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/app/api/auth/[...nextauth]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/app/api/auth/[...nextauth]/route.ts b/front/app/api/auth/[...nextauth]/route.ts index 356fb2d..aaa2998 100644 --- a/front/app/api/auth/[...nextauth]/route.ts +++ b/front/app/api/auth/[...nextauth]/route.ts @@ -42,7 +42,7 @@ export const authOptions: NextAuthOptions = { // Rafraîchir le token si expiré try { const response = await fetch( - `${process.env.KEYCLOAK_BASE_URL}/protocol/openid-connect/token`, + `${process.env.KEYCLOAK_BASE_URL}/realms/${process.env.KEYCLOAK_REALM}/protocol/openid-connect/token`, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" },