@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
- next({ name: `${authBase}.login` });
165
+ if(autoLogin === true) {
166
+ next({ name: `${authBase}.force-login` });
167
+ } else {
168
+ next({ name: `${authBase}.login` });
169
+ }
163
170
  }
164
171
  }
165
172
  });
@@ -10,7 +10,7 @@ const store = {
10
10
  intended: null,
11
11
  user: null,
12
12
  redirect: process.env.HYDRATE_REDIRECT ?? 'index',
13
- autoLogin: process.env.HYDRATE_ADMIN ?? false,
13
+ autoLogin: process.env.HYDRATE_ADMIN === 'true' ? true: false,
14
14
  }
15
15
  },
16
16
 
@@ -40,9 +40,7 @@ export default {
40
40
  },
41
41
 
42
42
  mounted() {
43
- if (this.$route.query.authenticated) {
44
- this.postLogin();
45
- }
43
+ this.postLogin();
46
44
  },
47
45
  };
48
46
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-velocity",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Avalere Health branded style system",
5
5
  "scripts": {
6
6
  "setup": "npm ci || npm i && npm run content",