@tapni/auth 0.0.85 → 0.0.87
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 +830 -833
- package/dist/TapniAuth.umd.js +3 -3
- package/package.json +1 -1
- package/src/App.vue +1 -2
- package/src/mixins/auth.mixin.js +0 -2
- package/src/services/Api.js +0 -4
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -32,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
32
32
|
<AuthVerify v-else-if="initialized && renderView === 'AuthVerify'" :isModal="isModal" />
|
|
33
33
|
<AuthReset v-else-if="initialized && renderView === 'AuthReset'" />
|
|
34
34
|
<AuthCallback v-else-if="initialized && renderView === 'AuthCallback'" />
|
|
35
|
-
<RouterView v-else
|
|
35
|
+
<RouterView v-else-if="display !== 'npm'" />
|
|
36
36
|
|
|
37
37
|
<div class="snackbar snackbar-boxed" id="snackbar">
|
|
38
38
|
<p class="snack-body" id="errorSnack">
|
|
@@ -136,7 +136,6 @@ export default {
|
|
|
136
136
|
const refreshTokens = this.getRefreshTokens();
|
|
137
137
|
this.setRefreshToken(refreshTokens[0]);
|
|
138
138
|
await this.getLoggedInAccounts();
|
|
139
|
-
// EventBus.$emit("ssoEvent", { name: "setStorage", data: this.$storage });
|
|
140
139
|
|
|
141
140
|
// Let App know that the auth is ready
|
|
142
141
|
this.$emit('ssoLibraryReady', this.$storage);
|
package/src/mixins/auth.mixin.js
CHANGED
|
@@ -245,9 +245,7 @@ export default {
|
|
|
245
245
|
},
|
|
246
246
|
async refreshTokenAction(data) {
|
|
247
247
|
return new Promise(async (resolve, reject) => {
|
|
248
|
-
console.log('auth-refreshTokenAction', data);
|
|
249
248
|
if (!this.refreshToken || this.refreshing) {
|
|
250
|
-
console.log('return-refreshTokenAction', this.refreshToken, this.refreshing);
|
|
251
249
|
return reject(null);
|
|
252
250
|
}
|
|
253
251
|
|
package/src/services/Api.js
CHANGED
|
@@ -49,14 +49,10 @@ export default {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
console.log('before interceptor enter', storage, refreshTokenAction);
|
|
53
|
-
|
|
54
52
|
// Check refresh token expiration before request is sent
|
|
55
53
|
if (storage && storage.token && !refreshTokenAction) {
|
|
56
54
|
const decoded = jwtDecode(storage.token)
|
|
57
55
|
|
|
58
|
-
console.log('interceptor enter', decoded, decoded.exp - 30 < Math.floor(Date.now() / 1000));
|
|
59
|
-
|
|
60
56
|
// Check if access token expired
|
|
61
57
|
if (decoded.exp - 30 < Math.floor(Date.now() / 1000)) {
|
|
62
58
|
|