@tapni/auth 0.0.24 → 0.0.26

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.24",
3
+ "version": "0.0.26",
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.13",
37
+ "@tapni/capacitor-reactive-localstorage-vue3": "^0.0.14",
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
@@ -8,6 +8,7 @@ export default {
8
8
  app.component('TapniAuth', App)
9
9
 
10
10
  if (app.config.globalProperties.$storage === undefined) {
11
+ console.log('xxx');
11
12
  app.use(ReactiveStorage, options);
12
13
  }
13
14
  }
@@ -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})
@@ -86,7 +86,7 @@ export default {
86
86
  if (this.$route.query.state) this.state = this.$route.query.state;
87
87
  if (this.$route.query.response_type)
88
88
  this.response_type = this.$route.query.response_type;
89
- 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;
90
90
 
91
91
  EventBus.$on("updateLang", this.updateLang);
92
92
 
@@ -152,7 +152,7 @@ export default {
152
152
 
153
153
  async eventLog(data) {
154
154
  const [err, response] = await to(
155
- UserService.eventLog(data, this.storage)
155
+ UserService.eventLog(data, this.$storage)
156
156
  );
157
157
  if (err) return this.errorHandler(err);
158
158
  return response;
@@ -179,11 +179,11 @@ export default {
179
179
  let err, response;
180
180
  if (data.username)
181
181
  [err, response] = await to(
182
- UserService.getByUsername(data, this.storage)
182
+ UserService.getByUsername(data, this.$storage)
183
183
  );
184
184
  else if (data.serial)
185
185
  [err, response] = await to(
186
- UserService.getByNumber(data, this.storage)
186
+ UserService.getByNumber(data, this.$storage)
187
187
  );
188
188
  if (err) return this.errorHandler(err);
189
189
  if (response.data.success) {
@@ -226,8 +226,8 @@ export default {
226
226
 
227
227
  this.setLoggedInUserId(response.data.data.id);
228
228
 
229
- this.storage.UserId = response.data.data.id;
230
- this.storage.username = response.data.data.username;
229
+ this.$storage.UserId = response.data.data.id;
230
+ this.$storage.username = response.data.data.username;
231
231
 
232
232
  if (response.isModal === true) {
233
233
  this.setLoggedInAccounts([
@@ -250,7 +250,7 @@ export default {
250
250
  id: data.id,
251
251
  refreshToken: this.refreshToken,
252
252
  refreshTokenAction: true
253
- }, this.storage)
253
+ }, this.$storage)
254
254
  );
255
255
  if (err && err.response && err.response.data.error === "ACCESS_DENIED") {
256
256
  this.logout(false);
@@ -261,7 +261,7 @@ export default {
261
261
  this.setToken(response.data.token);
262
262
  },
263
263
  async login(data) {
264
- const [err, response] = await to(AuthService.login(data, this.storage));
264
+ const [err, response] = await to(AuthService.login(data, this.$storage));
265
265
  if (err) return this.errorHandler(err);
266
266
  if (response.data.success) {
267
267
  if (this.display === "npm") {
@@ -310,19 +310,19 @@ export default {
310
310
  },
311
311
  async register(data) {
312
312
  const [err, response] = await to(
313
- AuthService.register(data, this.storage)
313
+ AuthService.register(data, this.$storage)
314
314
  );
315
315
  if (err) return this.errorHandler(err);
316
316
  return response;
317
317
  },
318
318
  async verify(data) {
319
- const [err, response] = await to(AuthService.verify(data, this.storage));
319
+ const [err, response] = await to(AuthService.verify(data, this.$storage));
320
320
  if (err) return this.errorHandler(err);
321
321
  return response;
322
322
  },
323
323
  async reset(data) {
324
324
  const [err, response] = await to(
325
- AuthService.sendResetEmail(data, this.storage)
325
+ AuthService.sendResetEmail(data, this.$storage)
326
326
  );
327
327
  if (err) return this.errorHandler(err);
328
328
  if (response.data.success) {
@@ -343,21 +343,21 @@ export default {
343
343
  },
344
344
  async changePassword(data) {
345
345
  const [err, response] = await to(
346
- AuthService.changePassword(data, this.storage)
346
+ AuthService.changePassword(data, this.$storage)
347
347
  );
348
348
  if (err) return this.errorHandler(err);
349
349
  return response.data.success;
350
350
  },
351
351
  async newPassword(data) {
352
352
  const [err, response] = await to(
353
- UserService.newPassword(data, this.storage)
353
+ UserService.newPassword(data, this.$storage)
354
354
  );
355
355
  if (err) return this.errorHandler(err);
356
356
  return response.data.success;
357
357
  },
358
358
  async deleteAccount(data) {
359
359
  const [err, response] = await to(
360
- UserService.deleteAccount(data, this.storage)
360
+ UserService.deleteAccount(data, this.$storage)
361
361
  );
362
362
  if (err) return this.errorHandler(err);
363
363
  return response.data.success;
@@ -378,33 +378,33 @@ export default {
378
378
  },
379
379
  };
380
380
  const [err, response] = await to(
381
- DeviceService.registerDevice(deviceData, this.storage)
381
+ DeviceService.registerDevice(deviceData, this.$storage)
382
382
  );
383
383
  if (err) return this.errorHandler(err);
384
384
  return response;
385
385
  },
386
386
  async addFcmToken(data) {
387
387
  const [err, response] = await to(
388
- DeviceService.addFcmToken(data, this.storage)
388
+ DeviceService.addFcmToken(data, this.$storage)
389
389
  );
390
390
  if (err) return this.errorHandler(err);
391
391
  return response;
392
392
  },
393
393
  async acceptCompanyInvitation(code) {
394
394
  const [err, response] = await to(
395
- CompanyService.acceptCompanyInvitation(code, this.storage)
395
+ CompanyService.acceptCompanyInvitation(code, this.$storage)
396
396
  );
397
397
  if (err) return this.errorHandler(err);
398
398
  return response;
399
399
  },
400
400
  async logout(sendRequest = true) {
401
401
  if (sendRequest) {
402
- AuthService.logout({ token: this.refreshToken }, this.storage);
402
+ AuthService.logout({ token: this.refreshToken }, this.$storage);
403
403
  }
404
404
 
405
- this.storage.username = null;
406
- this.storage.ssoUser = null;
407
- this.storage.UserId = null;
405
+ this.$storage.username = null;
406
+ this.$storage.ssoUser = null;
407
+ this.$storage.UserId = null;
408
408
  this.setLoggedInUserId(null);
409
409
  this.setToken(null);
410
410
  this.setRefreshToken(null);
@@ -418,8 +418,8 @@ export default {
418
418
  id: this.loggedInAccounts[username].id,
419
419
  }).then(() => {
420
420
  this.setLoggedInUserId(this.loggedInAccounts[username].id);
421
- this.storage.username = username;
422
- this.storage.UserId = this.loggedInAccounts[username].id;
421
+ this.$storage.username = username;
422
+ this.$storage.UserId = this.loggedInAccounts[username].id;
423
423
  this.getLoggedInAccounts();
424
424
  return this.$router.push("/" + username);
425
425
  });
@@ -430,7 +430,7 @@ export default {
430
430
  },
431
431
  async getCompanyBySSOEmail(data) {
432
432
  const [err, response] = await to(
433
- CompanyService.getBySSOEmail(data.email, this.storage)
433
+ CompanyService.getBySSOEmail(data.email, this.$storage)
434
434
  );
435
435
  if (err) return this.errorHandler(err);
436
436
  if (response.data.success) {
@@ -440,7 +440,7 @@ export default {
440
440
  async getLoggedInAccounts() {
441
441
  const refreshTokens = this.getRefreshTokens();
442
442
  const [err, response] = await to(
443
- AuthService.getLoggedInAccounts({ refreshTokens }, this.storage)
443
+ AuthService.getLoggedInAccounts({ refreshTokens }, this.$storage)
444
444
  );
445
445
  if (err) return this.errorHandler(err);
446
446
  if (response.data.success) {
@@ -449,7 +449,7 @@ export default {
449
449
  },
450
450
  async loginUsingQR(data) {
451
451
  const [err, response] = await to(
452
- UserService.loginUsingQR(data, this.storage)
452
+ UserService.loginUsingQR(data, this.$storage)
453
453
  );
454
454
  if (err) return this.errorHandler(err);
455
455
  return response.data.success;
@@ -467,16 +467,16 @@ export default {
467
467
  setUser(user) {
468
468
  this.ssoUser = user;
469
469
  if (
470
- this.storage &&
470
+ this.$storage &&
471
471
  this.ssoUser &&
472
- this.storage.username === this.ssoUser.username
472
+ this.$storage.username === this.ssoUser.username
473
473
  ) {
474
474
  this.appLanguage = user.ssoLang;
475
475
  }
476
476
  },
477
477
  getRefreshTokens() {
478
- console.log('getRefreshTokens', this.storage, this.storageApp);
479
- return this.storage.refreshTokens.split(',');
478
+ console.log('getRefreshTokens', this.$storage, this.$storageApp);
479
+ return this.$storage.refreshTokens.split(',');
480
480
  },
481
481
  setRefreshToken(token) {
482
482
  let refreshTokens = this.getRefreshTokens();
@@ -486,17 +486,17 @@ export default {
486
486
  if (refreshTokens.length >= 1) this.refreshToken = refreshTokens[0];
487
487
  else this.refreshToken = token;
488
488
 
489
- this.storage.refreshTokens = refreshTokens.join(",");
489
+ this.$storage.refreshTokens = refreshTokens.join(",");
490
490
  EventBus.$emit("ssoEvent", { name: "setRefreshToken", data: token });
491
491
  },
492
492
  setToken(token) {
493
493
  console.log('setup token')
494
- this.storage.token = token;
494
+ this.$storage.token = token;
495
495
  this.token = token;
496
496
  EventBus.$emit("ssoEvent", { name: "setToken", data: token });
497
497
  },
498
498
  setUserID(userID) {
499
- this.storage.UserId = userID;
499
+ this.$storage.UserId = userID;
500
500
  },
501
501
  updateLang(lang) {
502
502
  this.appLanguage = lang;
@@ -512,7 +512,7 @@ export default {
512
512
  if (this.$route.query.response_type)
513
513
  this.response_type = this.$route.query.response_type;
514
514
  if (this.$route.query.realm)
515
- this.storage.realm = this.$route.query.realm;
515
+ this.$storage.realm = this.$route.query.realm;
516
516
  if (this.$route.query.qrLogin) this.changeLoginToQr();
517
517
  },
518
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})
@@ -3,8 +3,8 @@ import {Capacitor} from '@capacitor/core';
3
3
  export default {
4
4
  computed: {
5
5
  home() {
6
- if (this.storage.token && this.storage.username) {
7
- 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
8
8
  if (import.meta.env.VITE_APP_MODE === 'redirect') return 'https://t.link/'
9
9
  } else return '/welcome'
10
10
  },
@@ -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,9 +371,6 @@ 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) {
@@ -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})