@sowell/quasar-app-extension-auth 0.3.8 → 0.3.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sowell/quasar-app-extension-auth",
3
- "version": "0.3.8",
3
+ "version": "0.3.11",
4
4
  "description": "A Quasar app extension to manage Authentication",
5
5
  "main": "src/index.js",
6
6
  "repository": "https://github.com/sowell-ai/quasar.extension.auth",
@@ -10,7 +10,6 @@ export default boot(({ app, router }: BootInterface) => {
10
10
  } = prompts;
11
11
 
12
12
  router.beforeEach((to, from, next) => {
13
- const auth = JSON.parse(LocalStorage.getItem("vuex") || "{}");
14
13
  const authState = app.config.globalProperties.authState;
15
14
  const isValid = authState.payload?.exp
16
15
  ? new Date(authState.payload?.exp * 1000) >= new Date()
@@ -18,9 +17,6 @@ export default boot(({ app, router }: BootInterface) => {
18
17
  : false
19
18
  : false;
20
19
 
21
- if (authState.raw === "") {
22
- if (auth) authState.updateRaw(auth?.token?.raw);
23
- }
24
20
  let token = authState.raw;
25
21
  if (
26
22
  (!isValid || !token) &&
@@ -29,7 +29,7 @@
29
29
  data-cy="emailReset"
30
30
  autofocus
31
31
  />
32
- <div class="q-mt-lg row">
32
+ <div class="q-mt-lg row justify-between items-center">
33
33
  <q-btn
34
34
  color="primary"
35
35
  :icon-right="icons.ionPaperPlaneOutline"
@@ -43,6 +43,18 @@
43
43
  @click="sendEmail"
44
44
  v-close-popup
45
45
  />
46
+
47
+ <q-btn
48
+ color="primary"
49
+ style="max-width: 330px"
50
+ data-cy="close_send_email"
51
+ align="center"
52
+ no-caps
53
+ flat
54
+ :label="$t('auth.login')"
55
+ class="btn-min"
56
+ v-close-popup
57
+ />
46
58
  </div>
47
59
  </div>
48
60
  </div>
@@ -88,7 +100,7 @@ export default defineComponent({
88
100
  });
89
101
  </script>
90
102
 
91
- <style>
103
+ <style scoped>
92
104
  .bg-image {
93
105
  background: #eef8fd;
94
106
  height: 100vh !important;
@@ -70,6 +70,7 @@ export function useAuth() {
70
70
  try {
71
71
  await authState.signin(data, options);
72
72
  push(LOCAL_SUCCESS_REDIRECTION_ROUTE);
73
+ loading.value = false;
73
74
  } catch (err) {
74
75
  loading.value = false;
75
76
  }