@tapni/auth 0.0.23 → 0.0.25

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/dist/style.css CHANGED
@@ -1 +1 @@
1
- .app-store-icon[data-v-bf520ec5]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-2fd511e2],#emailInput[data-v-2fd511e2],#emailInput[data-v-220c28f9]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-a128c2fa]{opacity:1}.sso-img[data-v-256337c2]{margin:2px auto 0;width:35px}input[data-v-256337c2]{margin:0 auto;height:25px}.sso-img[data-v-33bfb54b]{margin:2px auto 0;width:35px}input[data-v-33bfb54b]{margin:0 auto;height:25px}.link-grid,.user-link-img{width:100%;display:inline-table;position:relative}.link-grid{width:30%;margin:1.6%;padding:1.6%}.link-grid .user-link-img img{border-radius:25%!important}.link-grid .edit-icon{border-radius:20px;right:-3%;top:-3%;position:absolute;z-index:3;max-width:23%;overflow:hidden;min-width:30px}.link-grid .direct-icon{border-radius:20px;left:-3%;top:-3%;position:absolute;z-index:555;max-width:23%;overflow:hidden;min-width:30px}.link-grid .link-text{min-height:20px;margin-top:3px!important;display:block;text-align:center;line-height:normal;overflow-wrap:anywhere}.link-list{width:93%;max-height:67px!important;margin:0 auto;display:flex;border-radius:15px!important;background-color:#fff;border:solid 1px #e8e8e8;position:relative;align-items:center}.link-list .user-link-img{display:inline-block;width:65px;border-radius:25%!important}.link-list .link-text{display:inline-block;padding:18px 0% 17px 10%;font-size:15px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:left;border-radius:15px!important}.link-list .edit-icon{border-radius:20px;right:7%;top:30%;position:absolute;z-index:3;width:26px;overflow:hidden}.link-list .switching{width:45px}.link-list .direct-icon{border-radius:20px;left:-2%;top:-13%;position:absolute;z-index:555;width:26px;overflow:hidden}.small{width:22%!important;margin:2% 4% 0%;padding:0%}.small .link-text{margin-top:0!important;font-size:13px}.linkExternal{margin-right:20px;width:20px;display:inline-block!important;height:20px;background:#000;-webkit-mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;transform:scale(1.5)}.user-img[data-v-e5a7ac07]{margin:2px auto 0;width:65px}input[data-v-e5a7ac07]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}
1
+ .app-store-icon[data-v-8f6eac0d]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-a8caa217],#emailInput[data-v-a8caa217],#emailInput[data-v-452bcb4c]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-a128c2fa]{opacity:1}.sso-img[data-v-256337c2]{margin:2px auto 0;width:35px}input[data-v-256337c2]{margin:0 auto;height:25px}.sso-img[data-v-33bfb54b]{margin:2px auto 0;width:35px}input[data-v-33bfb54b]{margin:0 auto;height:25px}.link-grid,.user-link-img{width:100%;display:inline-table;position:relative}.link-grid{width:30%;margin:1.6%;padding:1.6%}.link-grid .user-link-img img{border-radius:25%!important}.link-grid .edit-icon{border-radius:20px;right:-3%;top:-3%;position:absolute;z-index:3;max-width:23%;overflow:hidden;min-width:30px}.link-grid .direct-icon{border-radius:20px;left:-3%;top:-3%;position:absolute;z-index:555;max-width:23%;overflow:hidden;min-width:30px}.link-grid .link-text{min-height:20px;margin-top:3px!important;display:block;text-align:center;line-height:normal;overflow-wrap:anywhere}.link-list{width:93%;max-height:67px!important;margin:0 auto;display:flex;border-radius:15px!important;background-color:#fff;border:solid 1px #e8e8e8;position:relative;align-items:center}.link-list .user-link-img{display:inline-block;width:65px;border-radius:25%!important}.link-list .link-text{display:inline-block;padding:18px 0% 17px 10%;font-size:15px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:left;border-radius:15px!important}.link-list .edit-icon{border-radius:20px;right:7%;top:30%;position:absolute;z-index:3;width:26px;overflow:hidden}.link-list .switching{width:45px}.link-list .direct-icon{border-radius:20px;left:-2%;top:-13%;position:absolute;z-index:555;width:26px;overflow:hidden}.small{width:22%!important;margin:2% 4% 0%;padding:0%}.small .link-text{margin-top:0!important;font-size:13px}.linkExternal{margin-right:20px;width:20px;display:inline-block!important;height:20px;background:#000;-webkit-mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;transform:scale(1.5)}.user-img[data-v-e5a7ac07]{margin:2px auto 0;width:65px}input[data-v-e5a7ac07]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapni/auth",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
@@ -34,7 +34,7 @@
34
34
  "@capacitor/preferences": "^5.0.6",
35
35
  "@codetrix-studio/capacitor-google-auth": "^3.3.6",
36
36
  "@recognizebv/capacitor-plugin-msauth": "^3.5.1",
37
- "@tapni/capacitor-reactive-localstorage-vue3": "^0.0.11",
37
+ "@tapni/capacitor-reactive-localstorage-vue3": "^0.0.13",
38
38
  "await-to-js": "^3.0.0",
39
39
  "axios": "^1.6.5",
40
40
  "jwt-decode": "^4.0.0",
package/src/App.vue CHANGED
@@ -122,8 +122,8 @@ export default {
122
122
  },
123
123
  methods: {
124
124
  async init () {
125
- if (this.storage && this.storage.token && this.storage.refreshTokens) {
126
- this.setToken(this.storage.token);
125
+ if (this.$storage && this.$storage.token && this.$storage.refreshTokens) {
126
+ this.setToken(this.$storage.token);
127
127
  const refreshTokens = this.getRefreshTokens();
128
128
  this.setRefreshToken(refreshTokens[0]);
129
129
  this.getLoggedInAccounts();
package/src/install.js CHANGED
@@ -1,9 +1,14 @@
1
1
  import App from "./App.vue";
2
+ import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
2
3
 
3
4
  // Export the component by default
4
5
  export default {
5
6
  TapniAuth: App,
6
7
  install: (app, options) => {
7
8
  app.component('TapniAuth', App)
9
+
10
+ if (app.config.globalProperties.$storage === undefined) {
11
+ app.use(ReactiveStorage, options);
12
+ }
8
13
  }
9
14
  };
package/src/main.js CHANGED
@@ -5,6 +5,7 @@ import { createApp } from 'vue'
5
5
  import RootApp from './App.vue'
6
6
  import router from './router'
7
7
  import VueCookies from 'vue-cookies'
8
+ import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
8
9
  import { App } from '@capacitor/app';
9
10
  import { Browser } from '@capacitor/browser';
10
11
 
@@ -12,6 +13,15 @@ const app = createApp(RootApp)
12
13
 
13
14
  app.config.productionTip = false
14
15
 
16
+ app.use(ReactiveStorage, {
17
+ 'token': '',
18
+ 'refreshTokens': '',
19
+ 'username': '',
20
+ 'UserId': '',
21
+ 'verifyEmail': '',
22
+ 'subdomain': ''
23
+ });
24
+
15
25
  // Cookies
16
26
  app.use(VueCookies)
17
27
 
@@ -33,7 +33,7 @@ export default {
33
33
  // Code Login
34
34
  if (this.display === 'popup') user.response_type = 'code';
35
35
 
36
- const [err, response] = await to(AuthService.appleSDK(user.response, this.storage))
36
+ const [err, response] = await to(AuthService.appleSDK(user.response, this.$storage))
37
37
  if (err) {
38
38
  this.appleLoad = false
39
39
  EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
@@ -17,10 +17,9 @@ import sr from "../store/locales/sr.js";
17
17
  import tr from "../store/locales/tr.js";
18
18
  import cn from "../store/locales/cn.js";
19
19
  import kr from "../store/locales/kr.js";
20
- import { StorageMixin } from '@tapni/capacitor-reactive-localstorage-vue3'
21
20
  import GlobalMixin from './global.mixin'
22
21
  export default {
23
- mixins: [StorageMixin, GlobalMixin],
22
+ mixins: [GlobalMixin],
24
23
  data() {
25
24
  return {
26
25
  appLanguage: "en",
@@ -87,7 +86,7 @@ export default {
87
86
  if (this.$route.query.state) this.state = this.$route.query.state;
88
87
  if (this.$route.query.response_type)
89
88
  this.response_type = this.$route.query.response_type;
90
- if (this.$route.query.realm) this.storage.realm = this.$route.query.realm;
89
+ if (this.$route.query.realm) this.$storage.realm = this.$route.query.realm;
91
90
 
92
91
  EventBus.$on("updateLang", this.updateLang);
93
92
 
@@ -153,7 +152,7 @@ export default {
153
152
 
154
153
  async eventLog(data) {
155
154
  const [err, response] = await to(
156
- UserService.eventLog(data, this.storage)
155
+ UserService.eventLog(data, this.$storage)
157
156
  );
158
157
  if (err) return this.errorHandler(err);
159
158
  return response;
@@ -180,11 +179,11 @@ export default {
180
179
  let err, response;
181
180
  if (data.username)
182
181
  [err, response] = await to(
183
- UserService.getByUsername(data, this.storage)
182
+ UserService.getByUsername(data, this.$storage)
184
183
  );
185
184
  else if (data.serial)
186
185
  [err, response] = await to(
187
- UserService.getByNumber(data, this.storage)
186
+ UserService.getByNumber(data, this.$storage)
188
187
  );
189
188
  if (err) return this.errorHandler(err);
190
189
  if (response.data.success) {
@@ -227,8 +226,8 @@ export default {
227
226
 
228
227
  this.setLoggedInUserId(response.data.data.id);
229
228
 
230
- this.storage.UserId = response.data.data.id;
231
- this.storage.username = response.data.data.username;
229
+ this.$storage.UserId = response.data.data.id;
230
+ this.$storage.username = response.data.data.username;
232
231
 
233
232
  if (response.isModal === true) {
234
233
  this.setLoggedInAccounts([
@@ -251,7 +250,7 @@ export default {
251
250
  id: data.id,
252
251
  refreshToken: this.refreshToken,
253
252
  refreshTokenAction: true
254
- }, this.storage)
253
+ }, this.$storage)
255
254
  );
256
255
  if (err && err.response && err.response.data.error === "ACCESS_DENIED") {
257
256
  this.logout(false);
@@ -262,7 +261,7 @@ export default {
262
261
  this.setToken(response.data.token);
263
262
  },
264
263
  async login(data) {
265
- const [err, response] = await to(AuthService.login(data, this.storage));
264
+ const [err, response] = await to(AuthService.login(data, this.$storage));
266
265
  if (err) return this.errorHandler(err);
267
266
  if (response.data.success) {
268
267
  if (this.display === "npm") {
@@ -311,19 +310,19 @@ export default {
311
310
  },
312
311
  async register(data) {
313
312
  const [err, response] = await to(
314
- AuthService.register(data, this.storage)
313
+ AuthService.register(data, this.$storage)
315
314
  );
316
315
  if (err) return this.errorHandler(err);
317
316
  return response;
318
317
  },
319
318
  async verify(data) {
320
- const [err, response] = await to(AuthService.verify(data, this.storage));
319
+ const [err, response] = await to(AuthService.verify(data, this.$storage));
321
320
  if (err) return this.errorHandler(err);
322
321
  return response;
323
322
  },
324
323
  async reset(data) {
325
324
  const [err, response] = await to(
326
- AuthService.sendResetEmail(data, this.storage)
325
+ AuthService.sendResetEmail(data, this.$storage)
327
326
  );
328
327
  if (err) return this.errorHandler(err);
329
328
  if (response.data.success) {
@@ -344,21 +343,21 @@ export default {
344
343
  },
345
344
  async changePassword(data) {
346
345
  const [err, response] = await to(
347
- AuthService.changePassword(data, this.storage)
346
+ AuthService.changePassword(data, this.$storage)
348
347
  );
349
348
  if (err) return this.errorHandler(err);
350
349
  return response.data.success;
351
350
  },
352
351
  async newPassword(data) {
353
352
  const [err, response] = await to(
354
- UserService.newPassword(data, this.storage)
353
+ UserService.newPassword(data, this.$storage)
355
354
  );
356
355
  if (err) return this.errorHandler(err);
357
356
  return response.data.success;
358
357
  },
359
358
  async deleteAccount(data) {
360
359
  const [err, response] = await to(
361
- UserService.deleteAccount(data, this.storage)
360
+ UserService.deleteAccount(data, this.$storage)
362
361
  );
363
362
  if (err) return this.errorHandler(err);
364
363
  return response.data.success;
@@ -379,33 +378,33 @@ export default {
379
378
  },
380
379
  };
381
380
  const [err, response] = await to(
382
- DeviceService.registerDevice(deviceData, this.storage)
381
+ DeviceService.registerDevice(deviceData, this.$storage)
383
382
  );
384
383
  if (err) return this.errorHandler(err);
385
384
  return response;
386
385
  },
387
386
  async addFcmToken(data) {
388
387
  const [err, response] = await to(
389
- DeviceService.addFcmToken(data, this.storage)
388
+ DeviceService.addFcmToken(data, this.$storage)
390
389
  );
391
390
  if (err) return this.errorHandler(err);
392
391
  return response;
393
392
  },
394
393
  async acceptCompanyInvitation(code) {
395
394
  const [err, response] = await to(
396
- CompanyService.acceptCompanyInvitation(code, this.storage)
395
+ CompanyService.acceptCompanyInvitation(code, this.$storage)
397
396
  );
398
397
  if (err) return this.errorHandler(err);
399
398
  return response;
400
399
  },
401
400
  async logout(sendRequest = true) {
402
401
  if (sendRequest) {
403
- AuthService.logout({ token: this.refreshToken }, this.storage);
402
+ AuthService.logout({ token: this.refreshToken }, this.$storage);
404
403
  }
405
404
 
406
- this.storage.username = null;
407
- this.storage.ssoUser = null;
408
- this.storage.UserId = null;
405
+ this.$storage.username = null;
406
+ this.$storage.ssoUser = null;
407
+ this.$storage.UserId = null;
409
408
  this.setLoggedInUserId(null);
410
409
  this.setToken(null);
411
410
  this.setRefreshToken(null);
@@ -419,8 +418,8 @@ export default {
419
418
  id: this.loggedInAccounts[username].id,
420
419
  }).then(() => {
421
420
  this.setLoggedInUserId(this.loggedInAccounts[username].id);
422
- this.storage.username = username;
423
- this.storage.UserId = this.loggedInAccounts[username].id;
421
+ this.$storage.username = username;
422
+ this.$storage.UserId = this.loggedInAccounts[username].id;
424
423
  this.getLoggedInAccounts();
425
424
  return this.$router.push("/" + username);
426
425
  });
@@ -431,7 +430,7 @@ export default {
431
430
  },
432
431
  async getCompanyBySSOEmail(data) {
433
432
  const [err, response] = await to(
434
- CompanyService.getBySSOEmail(data.email, this.storage)
433
+ CompanyService.getBySSOEmail(data.email, this.$storage)
435
434
  );
436
435
  if (err) return this.errorHandler(err);
437
436
  if (response.data.success) {
@@ -441,7 +440,7 @@ export default {
441
440
  async getLoggedInAccounts() {
442
441
  const refreshTokens = this.getRefreshTokens();
443
442
  const [err, response] = await to(
444
- AuthService.getLoggedInAccounts({ refreshTokens }, this.storage)
443
+ AuthService.getLoggedInAccounts({ refreshTokens }, this.$storage)
445
444
  );
446
445
  if (err) return this.errorHandler(err);
447
446
  if (response.data.success) {
@@ -450,7 +449,7 @@ export default {
450
449
  },
451
450
  async loginUsingQR(data) {
452
451
  const [err, response] = await to(
453
- UserService.loginUsingQR(data, this.storage)
452
+ UserService.loginUsingQR(data, this.$storage)
454
453
  );
455
454
  if (err) return this.errorHandler(err);
456
455
  return response.data.success;
@@ -468,16 +467,16 @@ export default {
468
467
  setUser(user) {
469
468
  this.ssoUser = user;
470
469
  if (
471
- this.storage &&
470
+ this.$storage &&
472
471
  this.ssoUser &&
473
- this.storage.username === this.ssoUser.username
472
+ this.$storage.username === this.ssoUser.username
474
473
  ) {
475
474
  this.appLanguage = user.ssoLang;
476
475
  }
477
476
  },
478
477
  getRefreshTokens() {
479
- console.log('getRefreshTokens', this.storage, this.storageApp);
480
- return this.storage.refreshTokens.split(',');
478
+ console.log('getRefreshTokens', this.$storage, this.$storageApp);
479
+ return this.$storage.refreshTokens.split(',');
481
480
  },
482
481
  setRefreshToken(token) {
483
482
  let refreshTokens = this.getRefreshTokens();
@@ -487,17 +486,17 @@ export default {
487
486
  if (refreshTokens.length >= 1) this.refreshToken = refreshTokens[0];
488
487
  else this.refreshToken = token;
489
488
 
490
- this.storage.refreshTokens = refreshTokens.join(",");
489
+ this.$storage.refreshTokens = refreshTokens.join(",");
491
490
  EventBus.$emit("ssoEvent", { name: "setRefreshToken", data: token });
492
491
  },
493
492
  setToken(token) {
494
493
  console.log('setup token')
495
- this.storage.token = token;
494
+ this.$storage.token = token;
496
495
  this.token = token;
497
496
  EventBus.$emit("ssoEvent", { name: "setToken", data: token });
498
497
  },
499
498
  setUserID(userID) {
500
- this.storage.UserId = userID;
499
+ this.$storage.UserId = userID;
501
500
  },
502
501
  updateLang(lang) {
503
502
  this.appLanguage = lang;
@@ -513,7 +512,7 @@ export default {
513
512
  if (this.$route.query.response_type)
514
513
  this.response_type = this.$route.query.response_type;
515
514
  if (this.$route.query.realm)
516
- this.storage.realm = this.$route.query.realm;
515
+ this.$storage.realm = this.$route.query.realm;
517
516
  if (this.$route.query.qrLogin) this.changeLoginToQr();
518
517
  },
519
518
  deep: true,
@@ -51,7 +51,7 @@ export default {
51
51
 
52
52
  if (user.accessToken) {
53
53
 
54
- const [err, response] = await to(AuthService.facebookSDK(user, this.storage))
54
+ const [err, response] = await to(AuthService.facebookSDK(user, this.$storage))
55
55
  if (err) {
56
56
  this.facebookLoad = false
57
57
  EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
@@ -1,12 +1,10 @@
1
1
  import {Capacitor} from '@capacitor/core';
2
- import {StorageMixin} from "@tapni/capacitor-reactive-localstorage-vue3";
3
2
 
4
3
  export default {
5
- mixins: [StorageMixin],
6
4
  computed: {
7
5
  home() {
8
- if (this.storage.token && this.storage.username) {
9
- if (import.meta.env.VITE_APP_MODE === 'npm') return '/' + this.storage.username
6
+ if (this.$storage.token && this.$storage.username) {
7
+ if (import.meta.env.VITE_APP_MODE === 'npm') return '/' + this.$storage.username
10
8
  if (import.meta.env.VITE_APP_MODE === 'redirect') return 'https://t.link/'
11
9
  } else return '/welcome'
12
10
  },
@@ -30,17 +28,6 @@ export default {
30
28
  return Capacitor.isNativePlatform()
31
29
  },
32
30
  },
33
- async mounted () {
34
- await this.initializeStorage({
35
- 'realm': '',
36
- 'token': '',
37
- 'refreshTokens': '',
38
- 'username': '',
39
- 'UserId': '',
40
- 'verifyEmail': '',
41
- 'subdomain': ''
42
- });
43
- },
44
31
  methods: {
45
32
  errorHandler(error) {
46
33
  if (error && error.response && error.response.data && error.response.data.error) {
@@ -34,7 +34,7 @@ export default {
34
34
  // Code Login
35
35
  if (this.display === 'popup') user.response_type = 'code';
36
36
 
37
- const [err, response] = await to(AuthService.googleSDK(user, this.storage))
37
+ const [err, response] = await to(AuthService.googleSDK(user, this.$storage))
38
38
  if (err) {
39
39
  this.googleLoad = false
40
40
  EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
@@ -51,7 +51,7 @@ export default {
51
51
 
52
52
  if (user && (user.accessToken || user.idToken)) {
53
53
  const [err, response] = await to(
54
- AuthService.microsoftSDK(user, this.storage)
54
+ AuthService.microsoftSDK(user, this.$storage)
55
55
  );
56
56
  if (err) {
57
57
  this.microsoftLoad = false;
@@ -32,7 +32,7 @@ export default {
32
32
  let user = {accessToken: response.data?.access_token, domain: data.domain}
33
33
  if (this.display === 'popup') user.response_type = 'code';
34
34
 
35
- [err, response] = await to(AuthService.oktaSDK(user, this.storage));
35
+ [err, response] = await to(AuthService.oktaSDK(user, this.$storage));
36
36
  if (err) {
37
37
  this.oktaLoad = false
38
38
  EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
@@ -85,7 +85,7 @@ export default {
85
85
  this.poolingInterval = setInterval(async () => {
86
86
  const [err, response] = await to(CompanyService.qrCodePooling({
87
87
  qrToken: this.qrCodeHash,
88
- }, this.storage));
88
+ }, this.$storage));
89
89
  if (err) return this.errorHandler(err);
90
90
  if (response.data.auth_code) {
91
91
  if (this.display === 'npm') {
@@ -31,7 +31,7 @@ export default {
31
31
  const platform = Capacitor.getPlatform();
32
32
 
33
33
  // append public key as relayState
34
- let relayState = Buffer.from(`code_challenge=${this.code_challenge}&platform=${platform}&redirect_uri=${(location.origin + '/callback/saml')}&realm=${this.storage.realm}`).toString('base64');
34
+ let relayState = Buffer.from(`code_challenge=${this.code_challenge}&platform=${platform}&redirect_uri=${(location.origin + '/callback/saml')}&realm=${this.$storage.realm}`).toString('base64');
35
35
 
36
36
  loginUrl = `${loginUrl}&RelayState=${relayState}`
37
37
 
@@ -24,7 +24,7 @@
24
24
  />
25
25
  </i>
26
26
  </a>
27
- <h1 class="bold no-bottom center-text" style="margin-top: 63px;" @click="bum">
27
+ <h1 class="bold no-bottom center-text" style="margin-top: 63px;">
28
28
  {{ this.ssoLang[this.appLang].login }}
29
29
  </h1>
30
30
  <p class="half-bottom small-top center-text color-black"></p>
@@ -371,14 +371,11 @@ export default {
371
371
  createAccountModal() {
372
372
  EventBus.$emit('ssoEvent', {name: 'toggleAddAccountModalRegister', data: {}})
373
373
  },
374
- async bum () {
375
- this.storage.token = '321213';
376
- }
377
374
  },
378
375
  watch: {
379
376
  emailOrUsername(nv) {
380
377
  if (nv.includes("@")) {
381
- this.storage.verifyEmail = nv;
378
+ this.$storage.verifyEmail = nv;
382
379
  }
383
380
  },
384
381
  '$route.path': async function(routePath) {
@@ -153,8 +153,8 @@ export default {
153
153
  // Track Referrals from Query or Local Storage
154
154
  if (this.$route.query.ref) {
155
155
  this.referral = this.$route.query.ref
156
- } else if (this.storage.referral) {
157
- this.referral = this.storage.referral
156
+ } else if (this.$storage.referral) {
157
+ this.referral = this.$storage.referral
158
158
  }
159
159
  }
160
160
  },
@@ -207,8 +207,8 @@ export default {
207
207
  }
208
208
  },
209
209
  watch: {
210
- email(nv) { this.storage.verifyEmail = nv },
211
- referral(nv) { this.storage.referral = nv }
210
+ email(nv) { this.$storage.verifyEmail = nv },
211
+ referral(nv) { this.$storage.referral = nv }
212
212
  }
213
213
  }
214
214
  </script>
@@ -82,8 +82,8 @@ export default {
82
82
  }
83
83
  },
84
84
  mounted () {
85
- if (this.storage.verifyEmail) {
86
- this.email = this.storage.verifyEmail
85
+ if (this.$storage.verifyEmail) {
86
+ this.email = this.$storage.verifyEmail
87
87
  }
88
88
  if (this.$route.query.c) {
89
89
  this.code = this.$route.query.c;
@@ -141,7 +141,7 @@ export default {
141
141
  },
142
142
  },
143
143
  watch: {
144
- email(nv) { this.storage.verifyEmail = nv }
144
+ email(nv) { this.$storage.verifyEmail = nv }
145
145
  }
146
146
  }
147
147
  </script>
@@ -69,7 +69,7 @@ export default {
69
69
  }
70
70
  },
71
71
  mounted () {
72
- if (this.storage.verifyEmail) this.email = this.storage.verifyEmail
72
+ if (this.$storage.verifyEmail) this.email = this.$storage.verifyEmail
73
73
  if (this.$route) this.init()
74
74
  },
75
75
  methods: {
@@ -77,8 +77,8 @@ export default {
77
77
  if (this.isLoggedIn) {
78
78
  this.$router.push(this.home)
79
79
  } else {
80
- if (this.storage.verifyEmail) {
81
- this.email = this.storage.verifyEmail
80
+ if (this.$storage.verifyEmail) {
81
+ this.email = this.$storage.verifyEmail
82
82
  }
83
83
  if (this.$route.hash === '#reset') {
84
84
  this.action = 'reset'
@@ -125,7 +125,7 @@ export default {
125
125
  }
126
126
  await this.loginSetup(response)
127
127
  this.getLoggedInAccounts()
128
- this.storage.verifyEmail = '';
128
+ this.$storage.verifyEmail = '';
129
129
  this.$router.push('/' + response.data.data.username + '#edit')
130
130
  this.successSnack(this.ssoLang[this.appLang].verify_account_success2)
131
131
  }
@@ -140,7 +140,7 @@ export default {
140
140
  },
141
141
  },
142
142
  watch: {
143
- 'storage.verifyEmail' (nv) {
143
+ '$storage.verifyEmail' (nv) {
144
144
  if (nv) this.email = nv
145
145
  },
146
146
  'route.name' (nv, ov) {
@@ -47,7 +47,7 @@ export default {
47
47
  video.play();
48
48
 
49
49
  setTimeout(() => {
50
- if (this.storage.token) {
50
+ if (this.$storage.token) {
51
51
  this.$router.push(this.home)
52
52
  } else {
53
53
  EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})