@tapni/auth 0.0.95 → 0.0.97

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.95",
3
+ "version": "0.0.97",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
package/src/App.vue CHANGED
@@ -135,7 +135,6 @@ export default {
135
135
 
136
136
  this.setToken(this.$storage.token);
137
137
  const refreshTokens = this.getRefreshTokens();
138
- console.log({refreshTokens});
139
138
  this.setRefreshToken(refreshTokens[0]);
140
139
  await this.getLoggedInAccounts(refreshTokens);
141
140
 
@@ -265,7 +265,8 @@ export default {
265
265
  // Set new access token
266
266
  if (response && response.data) {
267
267
  EventBus.$emit("setToken", response.data.token);
268
- EventBus.$emit("ssoEvent", { name: "setStorage", data: this.$storage });
268
+ data.storage.token = response.data.token;
269
+ EventBus.$emit("ssoEvent", { name: "setStorage", data: data.storage });
269
270
  resolve(response.data.token);
270
271
  }
271
272
  this.refreshing = false;
@@ -56,7 +56,7 @@ export default {
56
56
  // Check if access token expired
57
57
  if (decoded.exp - 30 < Math.floor(Date.now() / 1000)) {
58
58
 
59
- return refreshTokenAction({...decoded, refreshToken: storage.refreshTokens ? storage.refreshTokens.split(',')[0] : null, storage })
59
+ return AuthMixin.methods.refreshTokenAction({...decoded, refreshToken: storage.refreshTokens ? storage.refreshTokens.split(',')[0] : null, storage })
60
60
  .then((token) => {
61
61
  config.headers = {
62
62
  ...config.headers,