File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw
117117 return location ;
118118 }
119119
120- await routeStore . onRouteSwitchWhenLoggedIn ( ) ;
121-
122120 if ( ! routeStore . isInitAuthRoute ) {
123121 // initialize the auth route
124122 await routeStore . initAuthRoute ( ) ;
@@ -140,6 +138,8 @@ async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw
140138 }
141139 }
142140
141+ routeStore . onRouteSwitchWhenLoggedIn ( ) ;
142+
143143 // the auth route is initialized
144144 // it is not the "not-found" route, then it is allowed to access
145145 if ( ! isNotFoundRoute ) {
Original file line number Diff line number Diff line change @@ -69,8 +69,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
6969 const pass = await loginByToken ( loginToken ) ;
7070
7171 if ( pass ) {
72- await routeStore . initAuthRoute ( ) ;
73-
7472 await redirectFromLogin ( redirect ) ;
7573
7674 if ( routeStore . isInitAuthRoute ) {
You can’t perform that action at this time.
0 commit comments