@tapni/auth 1.0.66 → 1.0.68
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/.vite/manifest.json +8 -8
- package/dist/{Apps-BGr6XXC1.js → Apps-DrIjXIu-.js} +1 -1
- package/dist/{CustomApp-CUbr7Yc0.js → CustomApp-CH94gxCf.js} +1 -1
- package/dist/{QR-C-hIeHAf.js → QR-DudSvdIw.js} +1 -1
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +13 -13
- package/dist/{install-NW33kPfJ.js → install-CZLWg5gY.js} +182 -174
- package/package.json +2 -2
- package/src/App.vue +11 -5
- package/src/store/auth.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"vite": "^5.4.11",
|
|
66
66
|
"vite-plugin-node-polyfills": "^0.22.0"
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|
package/src/App.vue
CHANGED
|
@@ -57,11 +57,9 @@ import AuthCallback from '@/views/Callback.vue';
|
|
|
57
57
|
import { EventBus } from './store/event-bus.js';
|
|
58
58
|
import AuthMixin from '@/mixins/auth.mixin.js';
|
|
59
59
|
import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3';
|
|
60
|
-
import store from './store/auth.js';
|
|
61
60
|
import UtilService from './services/UtilService.js';
|
|
62
61
|
|
|
63
62
|
export default {
|
|
64
|
-
store,
|
|
65
63
|
name: 'TapniAuth',
|
|
66
64
|
mixins: [ReactiveStorage, AuthMixin],
|
|
67
65
|
data() {
|
|
@@ -145,9 +143,17 @@ export default {
|
|
|
145
143
|
UtilService.compareLangKeys();
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
if (this.isNative) {
|
|
147
|
+
this.$nextTick(() => {
|
|
148
|
+
try {
|
|
149
|
+
if (this.$store && this.$store.state && this.$store.state.auth) {
|
|
150
|
+
this.$store.commit('auth/addAllowedOrigin', 'capacitor://localhost');
|
|
151
|
+
}
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.error('Failed to add capacitor origin to allowed origins:', error);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
151
157
|
},
|
|
152
158
|
methods: {
|
|
153
159
|
checkAndClearStorage() {
|
package/src/store/auth.js
CHANGED
|
@@ -107,6 +107,11 @@ export default {
|
|
|
107
107
|
},
|
|
108
108
|
setApiRoot(state, apiRoot) {
|
|
109
109
|
state.apiRoot = apiRoot;
|
|
110
|
+
},
|
|
111
|
+
addAllowedOrigin(state, origin) {
|
|
112
|
+
if (!state.allowedOriginsAuth.includes(origin)) {
|
|
113
|
+
state.allowedOriginsAuth.push(origin);
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
},
|
|
112
117
|
actions: {
|