fixing redirect stuff

This commit is contained in:
csawatzky 2025-04-28 16:05:12 -06:00
parent 424b75afb8
commit f8fb4b7c7d
4 changed files with 23 additions and 24 deletions

View file

@ -45,11 +45,16 @@ function App() {
// if (!client_id) client_id = import.meta.env.VITE_AUTH0_CLIENT_ID;
//check the url for a code before auth0 causes a login re-direct
if (window.location.pathname !== "/callback") {
//set the code into local storage
let code = new URLSearchParams(window.location.search).get("code");
sessionStorage.setItem("code", code || "")
}
// if (window.location.pathname !== "/callback") {
// //set the code into local storage
// let code = new URLSearchParams(window.location.search).get("code");
// sessionStorage.setItem("code", code || "")
// }
const skipCallbacks = [
"/johndeere",
"/cnhi"
]
return (
<AppThemeProvider>
@ -60,6 +65,7 @@ function App() {
audience: or(audience, ""),
redirect_uri: window.location.origin + "/callback"
}}
skipRedirectCallback={skipCallbacks.includes(window.location.pathname)}
useRefreshTokens={true}
cacheLocation='localstorage'
>