Fix redirect urls

This commit is contained in:
Arthur Belleville 2025-03-27 08:41:42 +01:00
parent 9357416e76
commit 71b2e8a1ee
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ import { LandingPage } from "./pages/landing";
import { ProtectedRoute } from "./components/ProtectedRoute";
import { TabloPage } from "./pages/tablo";
import { SessionProvider } from "./contexts/SessionContext";
import { GoogleSigninPage } from "./pages/google-signin";
import { OAuthSigninPage } from "./pages/oauth-signin";
export const App = () => {
return (
@ -30,7 +30,7 @@ export const App = () => {
</ProtectedRoute>
}
/>
<Route path="/login-with-google" element={<GoogleSigninPage />} />
<Route path="/login-with-oauth" element={<OAuthSigninPage />} />
<Route path="/landing" element={<LandingPage />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/signup" element={<SignUpPage />} />

View file

@ -138,7 +138,7 @@ export function useLoginGoogle() {
const { data, error } = await supabase.auth.signInWithOAuth({
provider: "google",
options: {
redirectTo: `${window.location.origin}/login-with-google`,
redirectTo: `${window.location.origin}/login-with-oauth`,
},
});
if (error) throw error;

View file

@ -1,7 +1,7 @@
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
export const GoogleSigninPage = () => {
export const OAuthSigninPage = () => {
const navigate = useNavigate();
useEffect(() => {
setTimeout(() => {