@tapni/auth 1.0.7 → 1.0.9

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.
Files changed (54) hide show
  1. package/README.md +2 -0
  2. package/dist/.vite/manifest.json +12 -19
  3. package/dist/.well-known/assetlinks.json +10 -12
  4. package/dist/.well-known/microsoft-identity-association.json +5 -5
  5. package/dist/{Apps-BNLnNAmv.js → Apps-spt3-xmr.js} +1 -1
  6. package/dist/{Billing-C6F6zxbg.js → Billing-EQtSRyls.js} +1 -1
  7. package/dist/{CustomApp-B78nPESB.js → CustomApp-DytcodWc.js} +1 -1
  8. package/dist/{General-E-VRkj_Y.js → General-BBoC_TV2.js} +1 -1
  9. package/dist/{QR-vXam_Tu3.js → QR-DmSyXgb5.js} +1 -1
  10. package/dist/TapniAuth.es.js +1 -1
  11. package/dist/TapniAuth.umd.js +15 -15
  12. package/dist/blank.html +31 -0
  13. package/dist/{install-DW5mvDvp.js → install-DJ7V1wyP.js} +1870 -1940
  14. package/dist/site.webmanifest +11 -1
  15. package/dist/style.css +1 -1
  16. package/package.json +14 -5
  17. package/src/.prettierrc.json +16 -0
  18. package/src/components/DELETE_LinkIcon.vue +174 -225
  19. package/src/components/DELETE_SSOPick.vue +93 -148
  20. package/src/eslint.config.js +15 -0
  21. package/src/install.js +9 -10
  22. package/src/main.js +54 -57
  23. package/src/mixins/apple.mixin.js +56 -54
  24. package/src/mixins/auth.mixin.js +3 -2
  25. package/src/mixins/global.mixin.js +2 -2
  26. package/src/mixins/google.mixin.js +53 -54
  27. package/src/mixins/qr-auth.mixin.js +111 -107
  28. package/src/router/index.js +6 -6
  29. package/src/routes.js +1 -1
  30. package/src/services/Api.js +55 -57
  31. package/src/services/AuthService.js +0 -8
  32. package/src/services/CompanyService.js +10 -10
  33. package/src/services/DeviceService.js +3 -3
  34. package/src/services/UserService.js +45 -45
  35. package/src/services/UtilService.js +256 -218
  36. package/src/store/event-bus.js +22 -22
  37. package/src/store/locales/cn.js +442 -458
  38. package/src/store/locales/de.js +438 -517
  39. package/src/store/locales/es.js +442 -524
  40. package/src/store/locales/fr.js +442 -516
  41. package/src/store/locales/it.js +442 -514
  42. package/src/store/locales/kr.js +442 -491
  43. package/src/store/locales/lang.js +43 -43
  44. package/src/store/locales/sr.js +439 -492
  45. package/src/store/locales/tr.js +436 -487
  46. package/src/store/store.js +6 -6
  47. package/src/views/Account.vue +2 -2
  48. package/src/views/Callback.vue +36 -33
  49. package/src/views/Login.vue +4 -26
  50. package/src/views/Register.vue +1 -11
  51. package/src/views/Reset.vue +132 -135
  52. package/src/views/Verify.vue +153 -151
  53. package/dist/web-AXRKjAOB.js +0 -92
  54. package/src/mixins/facebook.mixin.js +0 -78
@@ -1,8 +1,8 @@
1
- import { createStore } from 'vuex'
2
- import auth from './auth.js'
1
+ import { createStore } from 'vuex';
2
+ import auth from './auth.js';
3
3
 
4
4
  export default createStore({
5
- modules: {
6
- auth
7
- },
8
- })
5
+ modules: {
6
+ auth
7
+ }
8
+ });
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
  </router-link>
105
105
 
106
- <router-link to="/apps" class="settingRow">
106
+ <router-link v-if="false" to="/apps" class="settingRow">
107
107
  <div class="firstRow">
108
108
  <img
109
109
  :src="getIcon('apps-black.svg')"
@@ -115,7 +115,7 @@
115
115
  </div>
116
116
  </router-link>
117
117
 
118
- <router-link to="/billing" class="settingRow">
118
+ <router-link v-if="false" to="/billing" class="settingRow">
119
119
  <div class="firstRow">
120
120
  <img
121
121
  :src="getIcon('billing-card-black.svg')"
@@ -1,46 +1,49 @@
1
1
  <template>
2
- <div class="page-login content-boxed content-boxed-padding">
3
- <h5 v-if="($route.query.platform ==='android' || $route.query.platform ==='ios') && !isNative" style="text-align: center; width: 80%; margin: 0 auto; margin-top: 260px; ">
4
- {{ssoLang[this.appLanguage].you_will_be_redirected}}<br>
5
- {{ssoLang[this.appLanguage].if_redirect_not_directly}}, <span @click="inAppRedirect" style="color: blue; cursor: pointer">{{ssoLang[this.appLanguage].click_here}}</span>.</h5>
6
- <h4 v-else style="text-align: center; width: 80%; margin: 0 auto; margin-top: 260px; ">{{ssoLang[this.appLanguage].please_wait}}</h4>
7
- </div>
2
+ <div class="page-login content-boxed content-boxed-padding">
3
+ <h5 v-if="($route.query.platform === 'android' || $route.query.platform === 'ios') && !isNative" style="text-align: center; width: 80%; margin: 0 auto; margin-top: 260px">
4
+ {{ ssoLang[this.appLanguage].you_will_be_redirected }}<br />
5
+ {{ ssoLang[this.appLanguage].if_redirect_not_directly }}, <span @click="inAppRedirect" style="color: blue; cursor: pointer">{{ ssoLang[this.appLanguage].click_here }}</span
6
+ >.
7
+ </h5>
8
+ <h4 v-else style="text-align: center; width: 80%; margin: 0 auto; margin-top: 260px">{{ ssoLang[this.appLanguage].please_wait }}</h4>
9
+ </div>
8
10
  </template>
9
11
 
10
12
  <script>
11
13
  /* eslint-disable */
12
- import OktaMixin from "../mixins/okta.mixin";
13
- import SamlMixin from "../mixins/saml.mixin";
14
- import AuthMixin from "../mixins/auth.mixin";
14
+ import OktaMixin from '../mixins/okta.mixin';
15
+ import SamlMixin from '../mixins/saml.mixin';
16
+ import AuthMixin from '../mixins/auth.mixin';
15
17
  import { sanitizeUrl } from '@braintree/sanitize-url';
16
18
  export default {
17
- name: "AuthCallback",
18
- mixins: [OktaMixin, SamlMixin, AuthMixin],
19
+ name: 'AuthCallback',
20
+ mixins: [OktaMixin, SamlMixin, AuthMixin],
19
21
 
20
- data() {
21
- return {
22
+ data() {
23
+ return {};
24
+ },
22
25
 
23
- };
24
- },
25
-
26
- async mounted() {
27
- if(this.$route.path === '/callback/auth') {
28
- this.exchangeAuthCode({
29
- code: this.$route.query.code
30
- })
31
- }
32
- if(this.$route.path === '/callback/okta') return await this.handleOktaRedirect();
33
- if(this.$route.path === '/callback/saml') return await this.handleSamlRedirect();
34
- },
35
- methods: {
36
- inAppRedirect() {
37
- let url = sanitizeUrl(location.href);
38
- url = url.replace('http', 'tapni')
39
- url = url.replace('https', 'tapni')
40
- return window.open(url);
26
+ async mounted() {
27
+ if (this.$route.path === '/callback/redirect') {
28
+ return location.href = atob(this.$route.query.uri);
41
29
  }
42
- },
43
-
30
+ if (this.$route.path === '/callback/auth') {
31
+ this.exchangeAuthCode({
32
+ code: this.$route.query.code,
33
+ code_verifier: this.$route.query.code_verifier
34
+ });
35
+ }
36
+ if (this.$route.path === '/callback/okta') return await this.handleOktaRedirect();
37
+ if (this.$route.path === '/callback/saml') return await this.handleSamlRedirect();
38
+ },
39
+ methods: {
40
+ inAppRedirect() {
41
+ let url = sanitizeUrl(location.href);
42
+ url = url.replace('http', 'tapni');
43
+ url = url.replace('https', 'tapni');
44
+ return window.open(url);
45
+ }
46
+ }
44
47
  };
45
48
  </script>
46
49
 
@@ -152,27 +152,6 @@
152
152
  <span v-else class="button--loading-black button__loader"></span>
153
153
  </a>
154
154
 
155
- <!-- Facebook Login Button -->
156
- <a
157
- @click="facebookLogin"
158
- v-if="displayFacebookLogin"
159
- class="button-center button button-90 google-button pointer"
160
- >
161
- <img
162
- src="https://cdn.tapni.co/icons/facebook-blue.png"
163
- style="
164
- position: absolute;
165
- margin-left: -9px;
166
- padding: 10px 0;
167
- height: 100%;
168
- "
169
- />
170
- <span v-if="!facebookLoad"
171
- >{{ ssoLang[appLanguage].sign_in_with }} Facebook</span
172
- >
173
- <span v-else class="button--loading-black button__loader"></span>
174
- </a>
175
-
176
155
  <!-- Microsoft Login Button -->
177
156
  <a
178
157
  @click="microsoftLogin"
@@ -314,7 +293,6 @@
314
293
 
315
294
  <script>
316
295
  import GoogleMixin from "../mixins/google.mixin";
317
- import FacebookMixin from "../mixins/facebook.mixin";
318
296
  import AppleMixin from "../mixins/apple.mixin";
319
297
  import MicrosoftMixin from "../mixins/microsoft.mixin";
320
298
  import OktaMixin from "../mixins/okta.mixin";
@@ -325,7 +303,7 @@ import { EventBus } from "../store/event-bus";
325
303
  import to from "await-to-js";
326
304
  export default {
327
305
  name: "AuthLogin",
328
- mixins: [GoogleMixin, FacebookMixin, AppleMixin, MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin, QRAuthMixin],
306
+ mixins: [GoogleMixin, AppleMixin, MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin, QRAuthMixin],
329
307
  data() {
330
308
  return {
331
309
  loading: true,
@@ -386,10 +364,10 @@ export default {
386
364
  this.forceClose();
387
365
  return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins);
388
366
  } else {
389
- if (ssoTypes[0] === "azure")
367
+ if (ssoTypes[1] === "azure")
390
368
  this.microsoftLogin("sso", response.sso.azure.sso);
391
- if (ssoTypes[0] === "okta") this.oktaLogin(response.sso.okta.sso);
392
- if (ssoTypes[0] === "saml")
369
+ if (ssoTypes[1] === "okta") this.oktaLogin(response.sso.okta.sso);
370
+ if (ssoTypes[1] === "saml")
393
371
  this.samlLogin(response.sso.saml.sso.loginUrl);
394
372
  }
395
373
  }
@@ -66,15 +66,6 @@
66
66
  <span v-else class="button--loading-black button__loader"></span>
67
67
  </a>
68
68
 
69
- <!-- Facebook Login Button -->
70
- <a v-if="displayFacebookLogin"
71
- @click="facebookLogin"
72
- class="button-center button button-90 google-button pointer">
73
- <img src="https://cdn.tapni.co/icons/facebook-blue.png" style="position: absolute; margin-left: -10px; padding: 10px 0; height: 100%;"/>
74
- <span v-if="!facebookLoad">{{ssoLang[this.appLanguage].sign_up_with}} Facebook</span>
75
- <span v-else class="button--loading-black button__loader"></span>
76
- </a>
77
-
78
69
  <!-- Email Login Button -->
79
70
  <a @click="emailLogin = true" v-if="!emailLogin"
80
71
  class="button-center button button-90 google-button pointer">
@@ -103,14 +94,13 @@
103
94
 
104
95
  <script>
105
96
  import GoogleMixin from '../mixins/google.mixin'
106
- import FacebookMixin from '../mixins/facebook.mixin'
107
97
  import AppleMixin from '../mixins/apple.mixin'
108
98
  import MicrosoftMixin from '../mixins/microsoft.mixin'
109
99
  import {EventBus} from "../store/event-bus";
110
100
  import AuthMixin from "../mixins/auth.mixin";
111
101
  export default {
112
102
  name: 'AuthRegister',
113
- mixins: [GoogleMixin, FacebookMixin, AppleMixin, MicrosoftMixin, AuthMixin],
103
+ mixins: [GoogleMixin, AppleMixin, MicrosoftMixin, AuthMixin],
114
104
  props: {
115
105
  isModal: {
116
106
  type: Boolean,
@@ -1,155 +1,152 @@
1
1
  <template>
2
- <form v-if="!passwordChange" class="page-login content-boxed content-boxed-padding" @submit.prevent="resetEmail" autocomplete="on">
3
- <h3 class="bold no-bottom center-text" style="margin-top: 63px;">{{ssoLang[this.appLanguage].reset_password}}</h3>
4
- <p class="half-bottom small-top center-text color-black"></p>
5
- <div class="page-login-field half-top color-black">
6
- <i style="padding-top: 10px; margin-left: 10px;">
7
- <img src="https://cdn.tapni.co/icons/mail.png" class="responsive-image" style="width: 80%;">
8
- </i>
9
- <input id="emailInput" v-model="email" @keydown.space.prevent type="email" :placeholder="ssoLang[this.appLanguage].email" required>
10
- <em></em>
11
- </div>
12
- <button type="submit" class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top">
13
- <span v-if="!submitted" class="uppercase">{{ssoLang[this.appLanguage].reset_password}}</span>
14
- <span v-else class="button--loading button__loader"></span>
15
- </button>
16
- <div class="decoration decoration-lines-thin no-bottom half-top"></div>
17
- <p class="close-text center-text half-top color-black">
18
- <span v-html="ssoLang[this.appLanguage].reset_password_p1"></span><a :href="'mailto:support@tapni.com?subject=' + ssoLang[this.appLanguage].password_reset_t"> support@tapni.com</a>
19
- </p>
20
- <div class="decoration decoration-lines-thin no-bottom half-top"></div>
2
+ <form v-if="!passwordChange" class="page-login content-boxed content-boxed-padding" @submit.prevent="resetEmail" autocomplete="on">
3
+ <h3 class="bold no-bottom center-text" style="margin-top: 63px">{{ ssoLang[this.appLanguage].reset_password }}</h3>
4
+ <p class="half-bottom small-top center-text color-black"></p>
5
+ <div class="page-login-field half-top color-black">
6
+ <i style="padding-top: 10px; margin-left: 10px">
7
+ <img src="https://cdn.tapni.co/icons/mail.png" class="responsive-image" style="width: 80%" />
8
+ </i>
9
+ <input id="emailInput" v-model="email" @keydown.space.prevent type="email" :placeholder="ssoLang[this.appLanguage].email" required />
10
+ <em></em>
11
+ </div>
12
+ <button type="submit" class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top">
13
+ <span v-if="!submitted" class="uppercase">{{ ssoLang[this.appLanguage].reset_password }}</span>
14
+ <span v-else class="button--loading button__loader"></span>
15
+ </button>
16
+ <div class="decoration decoration-lines-thin no-bottom half-top"></div>
17
+ <p class="close-text center-text half-top color-black"><span v-html="ssoLang[this.appLanguage].reset_password_p1"></span><a :href="'mailto:support@tapni.com?subject=' + ssoLang[this.appLanguage].password_reset_t"> support@tapni.com</a></p>
18
+ <div class="decoration decoration-lines-thin no-bottom half-top"></div>
21
19
 
22
- <div class="page-login-links">
23
- <router-link class="create float-right" to="/verify">{{ssoLang[this.appLanguage].verify_account}}</router-link>
24
- <router-link class="forgot float-left" to="/login">{{ssoLang[this.appLanguage].sign_in}}</router-link>
25
- <div class="clear"></div>
26
- </div>
27
- </form>
28
- <form v-else class="page-login content-boxed content-boxed-padding" @submit.prevent="changePw">
29
- <h3 class="bold no-bottom center-text" style="margin-top: 63px;">{{ssoLang[this.appLanguage].password_change}}</h3>
30
- <p class="half-bottom small-top center-text color-black">{{ssoLang[this.appLanguage].password_new}}</p>
31
- <div class="page-login-field half-top">
32
- <i style="padding-top: 15px">
33
- <img src="https://cdn.tapni.co/icons/padlock.png" class="responsive-image" style="width: 50%;">
34
- </i>
35
- <input v-model="password" :type="revealPassword ? 'text' : 'password'" :placeholder="ssoLang[this.appLanguage].password" required>
36
- <em @click="revealPassword = !revealPassword">
37
- <img v-show="!revealPassword" src="https://cdn.tapni.co/icons/reveal-password.png" class="responsive-image password-reveal-icon">
38
- <img v-show="revealPassword" src="https://cdn.tapni.co/icons/hide-password.png" class="responsive-image password-reveal-icon">
39
- </em>
40
- </div>
41
- <div class="page-login-field half-top">
42
- <i style="padding-top: 15px">
43
- <img src="https://cdn.tapni.co/icons/padlock.png" class="responsive-image" style="width: 50%;">
44
- </i>
45
- <input v-model="passwordRepeat" :type="revealPassword2 ? 'text' : 'password'" :placeholder="ssoLang[this.appLanguage].password_repeat" required>
46
- <em @click="revealPassword2 = !revealPassword2">
47
- <img v-show="!revealPassword2" src="https://cdn.tapni.co/icons/reveal-password.png" class="responsive-image password-reveal-icon">
48
- <img v-show="revealPassword2" src="https://cdn.tapni.co/icons/hide-password.png" class="responsive-image password-reveal-icon">
49
- </em>
50
- </div>
51
- <button type="submit" class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top">
52
- <span v-if="!submitted" class="uppercase">{{ssoLang[this.appLanguage].password_change}}</span>
53
- <span v-else class="button--loading button__loader"></span>
54
- </button>
20
+ <div class="page-login-links">
21
+ <router-link class="create float-right" to="/verify">{{ ssoLang[this.appLanguage].verify_account }}</router-link>
22
+ <router-link class="forgot float-left" to="/login">{{ ssoLang[this.appLanguage].sign_in }}</router-link>
23
+ <div class="clear"></div>
24
+ </div>
25
+ </form>
26
+ <form v-else class="page-login content-boxed content-boxed-padding" @submit.prevent="changePw">
27
+ <h3 class="bold no-bottom center-text" style="margin-top: 63px">{{ ssoLang[this.appLanguage].password_change }}</h3>
28
+ <p class="half-bottom small-top center-text color-black">{{ ssoLang[this.appLanguage].password_new }}</p>
29
+ <div class="page-login-field half-top">
30
+ <i style="padding-top: 15px">
31
+ <img src="https://cdn.tapni.co/icons/padlock.png" class="responsive-image" style="width: 50%" />
32
+ </i>
33
+ <input v-model="password" :type="revealPassword ? 'text' : 'password'" :placeholder="ssoLang[this.appLanguage].password" required />
34
+ <em @click="revealPassword = !revealPassword">
35
+ <img v-show="!revealPassword" src="https://cdn.tapni.co/icons/reveal-password.png" class="responsive-image password-reveal-icon" />
36
+ <img v-show="revealPassword" src="https://cdn.tapni.co/icons/hide-password.png" class="responsive-image password-reveal-icon" />
37
+ </em>
38
+ </div>
39
+ <div class="page-login-field half-top">
40
+ <i style="padding-top: 15px">
41
+ <img src="https://cdn.tapni.co/icons/padlock.png" class="responsive-image" style="width: 50%" />
42
+ </i>
43
+ <input v-model="passwordRepeat" :type="revealPassword2 ? 'text' : 'password'" :placeholder="ssoLang[this.appLanguage].password_repeat" required />
44
+ <em @click="revealPassword2 = !revealPassword2">
45
+ <img v-show="!revealPassword2" src="https://cdn.tapni.co/icons/reveal-password.png" class="responsive-image password-reveal-icon" />
46
+ <img v-show="revealPassword2" src="https://cdn.tapni.co/icons/hide-password.png" class="responsive-image password-reveal-icon" />
47
+ </em>
48
+ </div>
49
+ <button type="submit" class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top">
50
+ <span v-if="!submitted" class="uppercase">{{ ssoLang[this.appLanguage].password_change }}</span>
51
+ <span v-else class="button--loading button__loader"></span>
52
+ </button>
55
53
 
56
- <div class="decoration decoration-lines-thin no-bottom half-top"></div>
57
- <p class="close-text center-text half-top color-black">
58
- <span v-html="ssoLang[this.appLanguage].reset_password_p2"></span> <a :href="'mailto:support@tapni.com?subject=' + ssoLang[this.appLanguage].password_reset_t"> support@tapni.com</a>
59
- </p>
60
- </form>
54
+ <div class="decoration decoration-lines-thin no-bottom half-top"></div>
55
+ <p class="close-text center-text half-top color-black"><span v-html="ssoLang[this.appLanguage].reset_password_p2"></span> <a :href="'mailto:support@tapni.com?subject=' + ssoLang[this.appLanguage].password_reset_t"> support@tapni.com</a></p>
56
+ </form>
61
57
  </template>
62
58
 
63
59
  <script>
64
- import AuthMixin from "../mixins/auth.mixin";
65
- import {EventBus} from "../store/event-bus";
60
+ import AuthMixin from '../mixins/auth.mixin';
61
+ import { EventBus } from '../store/event-bus';
66
62
 
67
63
  export default {
68
- name: 'AuthReset',
69
- mixins: [AuthMixin],
70
- data () {
71
- return {
72
- loading: true,
73
- submitted: false,
74
- passwordChange: false,
75
- email: '',
76
- password: '',
77
- passwordRepeat: '',
78
- code: '',
79
- captcha: '',
80
- revealPassword: false,
81
- revealPassword2: false,
82
- }
83
- },
84
- mounted () {
85
- if (this.$storex.verifyEmail) {
86
- this.email = this.$storex.verifyEmail
87
- }
88
- if (this.$route.query.c) {
89
- this.code = this.$route.query.c;
90
- this.passwordChange = true
91
- }
92
- if (this.$route.query.e) {
93
- this.email = this.$route.query.e
94
- }
95
- EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
96
- },
97
- methods: {
98
- async resetEmail() {
99
- // if (this.captcha === '') return this.errorHandler({ message: 'Please select recaptcha' });
64
+ name: 'AuthReset',
65
+ mixins: [AuthMixin],
66
+ data() {
67
+ return {
68
+ loading: true,
69
+ submitted: false,
70
+ passwordChange: false,
71
+ email: '',
72
+ password: '',
73
+ passwordRepeat: '',
74
+ code: '',
75
+ captcha: '',
76
+ revealPassword: false,
77
+ revealPassword2: false
78
+ };
79
+ },
80
+ mounted() {
81
+ if (this.$storex.verifyEmail) {
82
+ this.email = this.$storex.verifyEmail;
83
+ }
84
+ if (this.$route.query.c) {
85
+ this.code = this.$route.query.c;
86
+ this.passwordChange = true;
87
+ }
88
+ if (this.$route.query.e) {
89
+ this.email = this.$route.query.e;
90
+ }
91
+ EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
92
+ },
93
+ methods: {
94
+ async resetEmail() {
95
+ // if (this.captcha === '') return this.errorHandler({ message: 'Please select recaptcha' });
100
96
 
101
- if (this.submitted) return
102
- this.submitted = true
97
+ if (this.submitted) return;
98
+ this.submitted = true;
103
99
 
104
- this.email = this.email.trim()
100
+ this.email = this.email.trim();
105
101
 
106
- let data = {
107
- email: this.email,
108
- captchaToken: await this.getCaptchaToken('password_reset')
109
- };
102
+ let data = {
103
+ email: this.email,
104
+ captchaToken: await this.getCaptchaToken('password_reset')
105
+ };
110
106
 
111
- await this.reset(data)
112
- this.submitted = false
113
- await this.$router.push('/verify?e=' + this.email + '#reset')
107
+ await this.reset(data);
108
+ this.submitted = false;
109
+ await this.$router.push('/verify?e=' + this.email + '#reset');
110
+ },
111
+ async changePw() {
112
+ // if (this.captcha === '') return this._vm.errorHandler({ message: 'Please select recaptcha' });
113
+ if (this.code.length !== 6) return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);
114
+ if (this.password !== this.passwordRepeat) return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);
114
115
 
115
- },
116
- async changePw() {
117
- // if (this.captcha === '') return this._vm.errorHandler({ message: 'Please select recaptcha' });
118
- if (this.code.length !== 6) return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);
119
- if (this.password !== this.passwordRepeat) return this.errorSnack(this.ssoLang[this.appLanguage].password_not_match);
116
+ if (this.submitted) return;
117
+ this.submitted = true;
120
118
 
121
- if (this.submitted) return
122
- this.submitted = true
119
+ this.email = this.email.trim();
120
+ this.code = this.code.trim();
123
121
 
124
- this.email = this.email.trim()
125
- this.code = this.code.trim()
122
+ let data = {
123
+ email: this.email,
124
+ code: this.code,
125
+ password: this.password,
126
+ passwordRepeat: this.passwordRepeat,
127
+ captchaToken: await this.getCaptchaToken('password_reset')
128
+ };
126
129
 
127
- let data = {
128
- email: this.email,
129
- code: this.code,
130
- password: this.password,
131
- passwordRepeat: this.passwordRepeat,
132
- captchaToken: await this.getCaptchaToken('password_reset')
133
- };
134
-
135
- let success = await this.changePassword(data)
136
- this.submitted = false
137
- if (success === true) {
138
- this.$router.push('/login');
139
- this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success);
140
- }
141
- },
142
- },
143
- watch: {
144
- email(nv) { this.$storex.verifyEmail = nv }
145
- }
146
- }
130
+ let success = await this.changePassword(data);
131
+ this.submitted = false;
132
+ if (success === true) {
133
+ this.$router.push('/login');
134
+ this.successSnack(this.ssoLang[this.appLanguage].password_reseted_success);
135
+ }
136
+ }
137
+ },
138
+ watch: {
139
+ email(nv) {
140
+ this.$storex.verifyEmail = nv;
141
+ }
142
+ }
143
+ };
147
144
  </script>
148
145
 
149
146
  <style scoped>
150
- #emailInput {
151
- text-align: center;
152
- padding-right: 15%;
153
- font-size: 17px;
154
- }
147
+ #emailInput {
148
+ text-align: center;
149
+ padding-right: 15%;
150
+ font-size: 17px;
151
+ }
155
152
  </style>