From a40a62d600f0cfb898e9d3181174e35fcd97fe26 Mon Sep 17 00:00:00 2001 From: Andil Date: Thu, 20 Aug 2026 23:36:54 +0000 Subject: [PATCH] fix: use backend API URL for Google OAuth --- frontend/src/pages/Connexion.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/Connexion.jsx b/frontend/src/pages/Connexion.jsx index 3356e10..3f697e5 100644 --- a/frontend/src/pages/Connexion.jsx +++ b/frontend/src/pages/Connexion.jsx @@ -17,9 +17,11 @@ export default function Connexion() { // Navigation pleine page (et non fetch) : le flux OAuth passe par des // redirections vers Google puis retour sur /auth/callback. - const handleGoogleLogin = () => { - window.location.href = '/api/auth/google' - } + const API_URL = import.meta.env.VITE_API_URL || '' + +const handleGoogleLogin = () => { + window.location.href = `${API_URL}/api/auth/google` +} const handleSubmit = async (e) => { e.preventDefault()