refactor: move post-login push logic to single place
This commit is contained in:
parent
d9e8703882
commit
72855d7725
2 changed files with 9 additions and 10 deletions
|
@ -88,7 +88,12 @@ async function loginTo(user?: Omit<UserLogin, 'account'> & { account?: AccountCr
|
|||
}
|
||||
}
|
||||
|
||||
if ('server' in route.params && user?.token && !useNuxtApp()._processingMiddleware) {
|
||||
// This only cleans up the URL; page content should stay the same
|
||||
if (route.path === '/signin/callback') {
|
||||
await router.push('/home')
|
||||
}
|
||||
|
||||
else if ('server' in route.params && user?.token && !useNuxtApp()._processingMiddleware) {
|
||||
await router.push({
|
||||
...route,
|
||||
force: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue