issue-38 #62

Closed
y wants to merge 48 commits from issue-38 into main
2 changed files with 5 additions and 10 deletions
Showing only changes of commit d85834c08d - Show all commits

View File

@ -35,7 +35,9 @@ const App = () => {
const handleRootRedirect = () => { const handleRootRedirect = () => {
if (authState.loggedIn) return appPrivateRoutes.homePage if (authState.loggedIn) return appPrivateRoutes.homePage
const callbackPathEncoded = btoa(window.location.href.split(`${window.location.origin}/#`)[1]) const callbackPathEncoded = btoa(
window.location.href.split(`${window.location.origin}/#`)[1]
)
return `${appPublicRoutes.login}?callbackPath=${callbackPathEncoded}` return `${appPublicRoutes.login}?callbackPath=${callbackPathEncoded}`
} }
@ -72,14 +74,7 @@ const App = () => {
} }
})} })}
<Route <Route path="*" element={<Navigate to={handleRootRedirect()} />} />
path="*"
element={
<Navigate
to={handleRootRedirect()}
/>
}
/>
</Route> </Route>
</Routes> </Routes>
) )

View File

@ -57,7 +57,7 @@ export const Login = () => {
const navigateAfterLogin = (path: string) => { const navigateAfterLogin = (path: string) => {
const callbackPath = searchParams.get('callbackPath') const callbackPath = searchParams.get('callbackPath')
if (callbackPath) { if (callbackPath) {
// base64 decoded path // base64 decoded path
const path = atob(callbackPath) const path = atob(callbackPath)