fix: use backend API URL for Google OAuth
This commit is contained in:
@@ -17,8 +17,10 @@ export default function Connexion() {
|
|||||||
|
|
||||||
// Navigation pleine page (et non fetch) : le flux OAuth passe par des
|
// Navigation pleine page (et non fetch) : le flux OAuth passe par des
|
||||||
// redirections vers Google puis retour sur /auth/callback.
|
// redirections vers Google puis retour sur /auth/callback.
|
||||||
|
const API_URL = import.meta.env.VITE_API_URL || ''
|
||||||
|
|
||||||
const handleGoogleLogin = () => {
|
const handleGoogleLogin = () => {
|
||||||
window.location.href = '/api/auth/google'
|
window.location.href = `${API_URL}/api/auth/google`
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSubmit = async (e) => {
|
const handleSubmit = async (e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user