@tapni/auth 0.0.33 → 0.0.34
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 +344 -342
- package/dist/TapniAuth.umd.js +3 -3
- package/package.json +1 -1
- package/src/App.vue +16 -6
- package/src/install.js +1 -3
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -122,13 +122,18 @@ export default {
|
|
|
122
122
|
},
|
|
123
123
|
methods: {
|
|
124
124
|
async init () {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
this.setRefreshToken(refreshTokens[0]);
|
|
129
|
-
this.getLoggedInAccounts();
|
|
130
|
-
}
|
|
125
|
+
|
|
126
|
+
// Make sure the function is called just once
|
|
127
|
+
if (this.initialized) return;
|
|
131
128
|
this.initialized = true;
|
|
129
|
+
|
|
130
|
+
// Make sure the storage is ready
|
|
131
|
+
if (!this.$storageReady.value) return;
|
|
132
|
+
|
|
133
|
+
this.setToken(this.$storage.token);
|
|
134
|
+
const refreshTokens = this.getRefreshTokens();
|
|
135
|
+
this.setRefreshToken(refreshTokens[0]);
|
|
136
|
+
this.getLoggedInAccounts();
|
|
132
137
|
this.$emit('ssoLibraryReady');
|
|
133
138
|
},
|
|
134
139
|
ssoOutgoingEvent (data) {
|
|
@@ -151,6 +156,11 @@ export default {
|
|
|
151
156
|
watch: {
|
|
152
157
|
display () {
|
|
153
158
|
this.applyBgStyle()
|
|
159
|
+
},
|
|
160
|
+
'$storageReady.value' (nv) {
|
|
161
|
+
if (nv) {
|
|
162
|
+
this.init()
|
|
163
|
+
}
|
|
154
164
|
}
|
|
155
165
|
}
|
|
156
166
|
}
|
package/src/install.js
CHANGED
|
@@ -4,9 +4,7 @@ import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
|
|
|
4
4
|
// Export the component by default
|
|
5
5
|
export default {
|
|
6
6
|
TapniAuth: App,
|
|
7
|
-
install: (app
|
|
7
|
+
install: (app) => {
|
|
8
8
|
app.component('TapniAuth', App);
|
|
9
|
-
|
|
10
|
-
+ app.use(ReactiveStorage, options);
|
|
11
9
|
}
|
|
12
10
|
};
|