@sowell/quasar-app-extension-auth 1.6.1 → 1.7.0

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": "1.6.1",
3
+ "version": "1.7.0",
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",
@@ -23,6 +23,8 @@ export default boot(({ app, router }: BootInterface) => {
23
23
  to.path !== LOCAL_LOGIN_ROUTE &&
24
24
  to.name !== "update_password" &&
25
25
  to.name !== "otp_validation" &&
26
+ to.name !== "first_login" &&
27
+ to.name !== "set_password" &&
26
28
  // NOTE: msal hash token
27
29
  !to.fullPath.includes("code=")
28
30
  ) {
@@ -93,7 +93,7 @@
93
93
  margin: 12px 0;
94
94
  text-decoration: underline;
95
95
  "
96
- @click="forgottenPassword = true"
96
+ @click="isMagicLinkEnabled ? goToForgotPassword() : (forgottenPassword = true)"
97
97
  data-testid="ask-password-change-btn"
98
98
  data-cy="forgot-password">
99
99
  {{ $t("auth.forgottenPassword") }}
@@ -125,17 +125,30 @@
125
125
  </div>
126
126
  </template>
127
127
  </div>
128
- <div class="error-message-container">
129
- <div
130
- v-if="apiErrorMessage"
131
- class="text-red column justify-center error_input">
128
+ <div v-if="apiErrorMessage" class="error-message-container">
129
+ <div class="text-red column justify-center error_input">
132
130
  <ErrorMessage
133
131
  :message="apiErrorMessage"
134
132
  class="error-message-item" />
135
133
  </div>
136
- <div v-else class="error-placeholder q-mt-sm"></div>
137
134
  </div>
138
135
  </q-form>
136
+ <div
137
+ v-if="isMagicLinkEnabled"
138
+ class="q-mx-lg first-login-block">
139
+ <div class="first-login-question">
140
+ {{ $t("auth.firstConnectionQuestion") }}
141
+ </div>
142
+ <q-btn
143
+ outline
144
+ no-caps
145
+ class="full-width first-login-button"
146
+ data-cy="activate-account"
147
+ data-testid="activate-account-btn"
148
+ @click="goToFirstLogin">
149
+ {{ $t("auth.activateAccount") }}
150
+ </q-btn>
151
+ </div>
139
152
  </div>
140
153
  </div>
141
154
  <div>
@@ -227,12 +240,15 @@ export default defineComponent({
227
240
  IS_OTP,
228
241
  icons,
229
242
  USE_SSO,
243
+ isMagicLinkEnabled,
230
244
  msalAuth,
231
245
  msalLoading,
232
246
  onSubmit,
233
247
  retypeEmail,
234
248
  isSubmitBtnDisabled,
235
- goToOtpValidation
249
+ goToOtpValidation,
250
+ goToFirstLogin,
251
+ goToForgotPassword
236
252
  } = useAuth()
237
253
 
238
254
  const { localStorage } = useQuasar()
@@ -315,10 +331,13 @@ export default defineComponent({
315
331
  retypeEmail,
316
332
  msalLoading,
317
333
  USE_SSO,
334
+ isMagicLinkEnabled,
318
335
  msalAuth,
319
336
  handleSubmit,
320
337
  resetPassword,
321
- goToPrivacyPolicy
338
+ goToPrivacyPolicy,
339
+ goToFirstLogin,
340
+ goToForgotPassword
322
341
  }
323
342
  }
324
343
  })
@@ -379,7 +398,8 @@ export default defineComponent({
379
398
  }
380
399
 
381
400
  .forgot-password-link {
382
- font-size: 10px;
401
+ font-size: 15px;
402
+ font-weight: 500;
383
403
  cursor: pointer;
384
404
  color: #001d3d;
385
405
  }
@@ -436,10 +456,6 @@ export default defineComponent({
436
456
  border: 1px solid #ff8b87 !important;
437
457
  }
438
458
 
439
- .error-placeholder {
440
- min-height: 50px;
441
- }
442
-
443
459
  .error-message-container {
444
460
  margin: 24px;
445
461
  }
@@ -456,6 +472,27 @@ export default defineComponent({
456
472
  margin-bottom: 4px;
457
473
  }
458
474
 
475
+ .first-login-block {
476
+ margin-top: 32px;
477
+ }
478
+
479
+ .first-login-question {
480
+ font-size: 15px;
481
+ font-weight: 500;
482
+ color: #001d3d;
483
+ margin-top: 25px;
484
+ margin-bottom: 25px;
485
+ }
486
+
487
+ .first-login-button {
488
+ height: 65px;
489
+ border-radius: 10px;
490
+ border-color: #40c4ff;
491
+ color: #40c4ff;
492
+ font-size: 16px;
493
+ font-weight: 600;
494
+ }
495
+
459
496
  @media (max-width: 389px) {
460
497
  .title {
461
498
  margin-top: 80px;
@@ -490,9 +527,5 @@ export default defineComponent({
490
527
  min-height: 50px;
491
528
  padding: 4px 12px;
492
529
  }
493
-
494
- .error-placeholder {
495
- min-height: 25px;
496
- }
497
530
  }
498
531
  </style>