@tapni/auth 1.0.67 → 1.0.69

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": "1.0.67",
3
+ "version": "1.0.69",
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
@@ -143,9 +143,17 @@ export default {
143
143
  UtilService.compareLangKeys();
144
144
  }
145
145
 
146
- if (this.isNative) {
147
- this.$store.auth.state.allowedOriginsAuth.push('capacitor://localhost');
148
- }
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
+ }
149
157
  },
150
158
  methods: {
151
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: {
@@ -38,8 +38,8 @@
38
38
  <router-link class="forgot float-left" to="/login">{{ ssoLang[this.appLanguage].sign_in }}</router-link>
39
39
  <div class="clear"></div>
40
40
  </div>
41
- <div v-else class="page-login-links" @click="registerAccountModal">
42
- <a class="forgot center-text pointer small-top"
41
+ <div v-else class="page-login-links">
42
+ <a class="forgot center-text pointer small-top" @click.prevent="registerAccountModal"
43
43
  >{{ ssoLang[this.appLanguage].or }} <br />
44
44
  {{ ssoLang[this.appLanguage].create_new_account }}</a
45
45
  >