@tapni/auth 0.0.33 → 0.0.35
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 -345
- package/dist/TapniAuth.umd.js +3 -3
- package/package.json +1 -1
- package/src/App.vue +9 -7
- package/src/install.js +1 -3
- package/src/views/Login.vue +3 -3
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -122,13 +122,15 @@ 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
|
+
this.setToken(this.$storage.token);
|
|
131
|
+
const refreshTokens = this.getRefreshTokens();
|
|
132
|
+
this.setRefreshToken(refreshTokens[0]);
|
|
133
|
+
this.getLoggedInAccounts();
|
|
132
134
|
this.$emit('ssoLibraryReady');
|
|
133
135
|
},
|
|
134
136
|
ssoOutgoingEvent (data) {
|
|
@@ -151,7 +153,7 @@ export default {
|
|
|
151
153
|
watch: {
|
|
152
154
|
display () {
|
|
153
155
|
this.applyBgStyle()
|
|
154
|
-
}
|
|
156
|
+
},
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
159
|
</script>
|
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
|
};
|
package/src/views/Login.vue
CHANGED
|
@@ -300,14 +300,14 @@ export default {
|
|
|
300
300
|
computed: {
|
|
301
301
|
displayFormLogin() {
|
|
302
302
|
return (
|
|
303
|
-
(this.
|
|
303
|
+
(this.ssoCompany?.login?.form_login && !this.isModal) ?? this.emailLogin
|
|
304
304
|
);
|
|
305
305
|
},
|
|
306
306
|
displayResetPasswordLogin() {
|
|
307
|
-
return (this.
|
|
307
|
+
return (this.ssoCompany?.login?.reset_password && !this.isModal) ?? true;
|
|
308
308
|
},
|
|
309
309
|
displayRegisterLogin() {
|
|
310
|
-
return (this.
|
|
310
|
+
return (this.ssoCompany?.login?.create_account && !this.isModal) ?? true;
|
|
311
311
|
},
|
|
312
312
|
},
|
|
313
313
|
async mounted() {
|