@tapni/auth 0.0.55 → 0.0.56

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": "@tapni/auth",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
@@ -280,7 +280,7 @@ export default {
280
280
  this.redirect_uri.startsWith(domain)
281
281
  )
282
282
  ) {
283
- return console.log("Redirect URI not allowed");
283
+ return console.error("Redirect URI not allowed");
284
284
  }
285
285
 
286
286
  location.href = this.redirect_uri +
@@ -328,13 +328,8 @@ export default {
328
328
  }
329
329
  },
330
330
  async exchangeAuthCode(data) {
331
- console.log({data});
332
331
  const [err, response] = await to(AuthService.exchangeAuthCode(data, this.$storage));
333
- if (err) {
334
- console.log({err});
335
- return this.errorHandler(err);
336
- }
337
- console.log(response);
332
+ if (err) return this.errorHandler(err);
338
333
  await this.loginSetup(response);
339
334
  await this.getLoggedInAccounts();
340
335
  this.loginSuccess(response);
@@ -400,9 +395,11 @@ export default {
400
395
  AuthService.logout({ token: this.refreshToken }, this.$storage);
401
396
  }
402
397
 
403
- this.$storage.username = '';
404
- this.$storage.ssoUser = '';
405
- this.$storage.UserId = '';
398
+ if (this.$storage) {
399
+ this.$storage.username = '';
400
+ this.$storage.ssoUser = '';
401
+ this.$storage.UserId = '';
402
+ }
406
403
  this.setLoggedInUserId('');
407
404
  this.setToken('');
408
405
  this.setRefreshToken('');
@@ -416,8 +413,10 @@ export default {
416
413
  id: this.loggedInAccounts[username].id,
417
414
  }).then(() => {
418
415
  this.setLoggedInUserId(this.loggedInAccounts[username].id);
419
- this.$storage.username = username;
420
- this.$storage.UserId = this.loggedInAccounts[username].id;
416
+ if (this.$storage) {
417
+ this.$storage.username = username;
418
+ this.$storage.UserId = this.loggedInAccounts[username].id;
419
+ }
421
420
  this.getLoggedInAccounts();
422
421
  return this.$router.push("/" + username);
423
422
  });
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
- }