Skip to content

Commit

Permalink
fix: redirect to dashboard after login (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Dorien Grönwald <[email protected]>
  • Loading branch information
doriengr and Dorien Grönwald authored Oct 8, 2024
1 parent 5fcc265 commit 97a370a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/login')({
beforeLoad: async () => {
const loginUrl = await userApi.v1UserLoginGet({
redirectUrl: `${window.location.origin}/auth/callback?redirect=${encodeURIComponent("/")}`
redirectUrl: `${window.location.origin}/auth/callback?redirect=${encodeURIComponent("/dashboard")}`
}).then((res) => res.loginUrl)

window.location.href = loginUrl
}

})

0 comments on commit 97a370a

Please sign in to comment.