From 0f52afdb9c553dd04baa3a151a4b97ce6bb5f8d2 Mon Sep 17 00:00:00 2001 From: Andy Santana <andysantana0106@gmail.com> Date: Thu, 12 Dec 2024 17:33:30 -0400 Subject: [PATCH] Fix(2753): Replace React Router Navigate with window.location for SSO state refresh (#2818) * fix(2753): update SSO redirect to use window.location.replace * fix(2753): remove unused import --------- Co-authored-by: Timothy Carambat <rambat1010@gmail.com> --- frontend/src/pages/Login/SSO/simple.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/pages/Login/SSO/simple.jsx b/frontend/src/pages/Login/SSO/simple.jsx index 1ceedcfb8e..48b9edf93d 100644 --- a/frontend/src/pages/Login/SSO/simple.jsx +++ b/frontend/src/pages/Login/SSO/simple.jsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { FullScreenLoader } from "@/components/Preloader"; -import { Navigate } from "react-router-dom"; import paths from "@/utils/paths"; import useQuery from "@/hooks/useQuery"; import System from "@/models/system"; @@ -47,7 +46,7 @@ export default function SimpleSSOPassthrough() { </p> </div> ); - if (ready) return <Navigate to={redirectPath} />; + if (ready) return window.location.replace(redirectPath); // Loading state by default return <FullScreenLoader />;