@tapni/auth 1.0.2 → 1.0.4

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.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
package/src/App.vue CHANGED
@@ -18,7 +18,6 @@ document.addEventListener('DOMContentLoaded', function() {
18
18
  <Language v-if="!isModal" />
19
19
  <SSO v-if="!isModal" />
20
20
  <SSOPick v-if="!isModal" />
21
- <OTP />
22
21
 
23
22
  <AuthWelcome v-if="initialized && renderView === 'AuthWelcome'" />
24
23
  <AuthLogin v-else-if="initialized && renderView === 'AuthLogin'" :isModal="isModal" />
@@ -143,7 +142,7 @@ export default {
143
142
  EventBus.$on('refreshTokenAction',(data) => this.refreshTokenAction({...data, storage: this.$storex}))
144
143
  EventBus.$on('switchAccount',(data) => this.switchAccount(data))
145
144
  EventBus.$on('setToken',(data) => this.setToken(data))
146
- EventBus.$on('setStorage',(data) => this.setStorage(data))
145
+ EventBus.$on('setStorageItem',(data) => this.setStorageItem(data))
147
146
  },
148
147
  methods: {
149
148
  async init () {
@@ -43,6 +43,7 @@ export default {
43
43
  'setToken',
44
44
  'setView',
45
45
  'setStorage',
46
+ 'setStorageItem',
46
47
  'updateLang',
47
48
  'login',
48
49
  'register',
package/src/store/auth.js CHANGED
@@ -73,6 +73,9 @@ export default {
73
73
  setAccountSettings(state, account) {
74
74
  state.account = account;
75
75
  },
76
+ setStorageItem(state, item) {
77
+ state.$storex[item.name] = item.data;
78
+ },
76
79
  setStorage(state, storage) {
77
80
  state.$storex = {
78
81
  ...state.$storex,
@@ -135,6 +138,9 @@ export default {
135
138
  commit('setAccountSettings', response.data.data);
136
139
  }
137
140
  },
141
+ setStorageItem({ commit }, item) {
142
+ commit('setStorageItem', item);
143
+ },
138
144
  setStorage({ commit }, storage) {
139
145
  commit('setStorage', storage);
140
146
  },