@fishawack/lab-velocity 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -143,8 +143,9 @@ export function configureRoutes(router) {
|
|
|
143
143
|
} else if (to.name === "login" || to.name === `${authBase}.login`) {
|
|
144
144
|
if(autoLogin) {
|
|
145
145
|
next({ name: `${authBase}.force-login` });
|
|
146
|
+
} else {
|
|
147
|
+
next({ name: redirect });
|
|
146
148
|
}
|
|
147
|
-
next({ name: redirect });
|
|
148
149
|
} else if (
|
|
149
150
|
!user?.email_verified_at &&
|
|
150
151
|
to.matched.some((d) => d.meta.guest) !== true
|
|
@@ -158,8 +159,14 @@ export function configureRoutes(router) {
|
|
|
158
159
|
next();
|
|
159
160
|
} else if (admin) {
|
|
160
161
|
next({ name: "login" });
|
|
162
|
+
} else if (to.path === "/callback") {
|
|
163
|
+
next({ name: `${authBase}.callback` });
|
|
161
164
|
} else {
|
|
162
|
-
|
|
165
|
+
if(autoLogin === true) {
|
|
166
|
+
next({ name: `${authBase}.force-login` });
|
|
167
|
+
} else {
|
|
168
|
+
next({ name: `${authBase}.login` });
|
|
169
|
+
}
|
|
163
170
|
}
|
|
164
171
|
}
|
|
165
172
|
});
|