@tapni/auth 0.0.55 → 0.0.57
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/TapniAuth.es.js +914 -921
- package/dist/TapniAuth.umd.js +11 -11
- package/package.json +1 -1
- package/src/mixins/auth.mixin.js +11 -12
- package/.vscode/extensions.json +0 -3
package/package.json
CHANGED
package/src/mixins/auth.mixin.js
CHANGED
|
@@ -280,7 +280,7 @@ export default {
|
|
|
280
280
|
this.redirect_uri.startsWith(domain)
|
|
281
281
|
)
|
|
282
282
|
) {
|
|
283
|
-
return console.
|
|
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
|
|
404
|
-
|
|
405
|
-
|
|
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
|
|
420
|
-
|
|
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
|
});
|
package/.vscode/extensions.json
DELETED