@tapni/auth 0.0.109 → 0.0.119
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 +26 -0
- package/dist/Account-HviGmWOw.js +111 -0
- package/dist/QR-lJ0KyGvG.js +41 -0
- package/dist/TapniAuth.es.js +2 -16733
- package/dist/TapniAuth.umd.js +35 -35
- package/dist/install-Ii2MI8ry.js +18289 -0
- package/dist/style.css +1 -1
- package/package.json +6 -3
- package/src/App.vue +55 -11
- package/src/components/Language.vue +1 -1
- package/src/components/ModalOverlay.vue +1 -0
- package/src/components/OTP.vue +120 -0
- package/src/install.js +0 -3
- package/src/main.js +3 -11
- package/src/mixins/apple.mixin.js +2 -2
- package/src/mixins/auth.mixin.js +52 -509
- package/src/mixins/facebook.mixin.js +2 -2
- package/src/mixins/global.mixin.js +5 -4
- package/src/mixins/google.mixin.js +2 -2
- package/src/mixins/mfa-auth.mixin.js +76 -0
- package/src/mixins/microsoft.mixin.js +3 -7
- package/src/mixins/okta.mixin.js +1 -1
- package/src/mixins/qr-auth.mixin.js +6 -1
- package/src/mixins/saml.mixin.js +2 -1
- package/src/routes.js +13 -0
- package/src/services/Api.js +15 -28
- package/src/services/AuthService.js +42 -37
- package/src/services/CompanyService.js +7 -8
- package/src/services/DeviceService.js +5 -6
- package/src/services/UserService.js +22 -23
- package/src/services/UtilService.js +1 -1
- package/src/store/locales/en.js +8 -1
- package/src/store/store.js +563 -0
- package/src/views/Account.vue +236 -0
- package/src/views/Login.vue +29 -15
- package/src/views/MFA.vue +109 -0
- package/src/views/Register.vue +10 -10
- package/src/views/Reset.vue +3 -3
- package/src/views/Verify.vue +4 -4
- package/src/views/Welcome.vue +3 -2
- package/src/styles/framework.css +0 -4012
- package/src/styles/inter.ttf +0 -0
- package/src/styles/style.css +0 -618
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.app-store-icon[data-v-
|
|
1
|
+
.app-store-icon[data-v-3d89d57a]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-89d98ef3],#emailInput[data-v-89d98ef3],#emailInput[data-v-69a9cfa3]{text-align:center;padding-right:15%;font-size:17px}.fade-enter-to[data-v-17c95816]{opacity:1}.sso-img[data-v-11f19a09]{margin:2px auto 0;width:35px}input[data-v-11f19a09]{margin:0 auto;height:25px}.sso-img[data-v-2b6d6269]{margin:2px auto 0;width:35px}input[data-v-2b6d6269]{margin:0 auto;height:25px}.padlock-img[data-v-2b6d6269]{margin:2px auto 15px;width:40px}.sso-img[data-v-4f821f65]{margin:2px auto 0;width:35px}input[data-v-4f821f65]{margin:0 auto;height:25px}.link-grid,.user-link-img{width:100%;display:inline-table;position:relative}.link-grid{width:30%;margin:1.6%;padding:1.6%}.link-grid .user-link-img img{border-radius:25%!important}.link-grid .edit-icon{border-radius:20px;right:-3%;top:-3%;position:absolute;z-index:3;max-width:23%;overflow:hidden;min-width:30px}.link-grid .direct-icon{border-radius:20px;left:-3%;top:-3%;position:absolute;z-index:555;max-width:23%;overflow:hidden;min-width:30px}.link-grid .link-text{min-height:20px;margin-top:3px!important;display:block;text-align:center;line-height:normal;overflow-wrap:anywhere}.link-list{width:93%;max-height:67px!important;margin:0 auto;display:flex;border-radius:15px!important;background-color:#fff;border:solid 1px #e8e8e8;position:relative;align-items:center}.link-list .user-link-img{display:inline-block;width:65px;border-radius:25%!important}.link-list .link-text{display:inline-block;padding:18px 0% 17px 10%;font-size:15px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;text-align:left;border-radius:15px!important}.link-list .edit-icon{border-radius:20px;right:7%;top:30%;position:absolute;z-index:3;width:26px;overflow:hidden}.link-list .switching{width:45px}.link-list .direct-icon{border-radius:20px;left:-2%;top:-13%;position:absolute;z-index:555;width:26px;overflow:hidden}.small{width:22%!important;margin:2% 4% 0%;padding:0%}.small .link-text{margin-top:0!important;font-size:13px}.linkExternal{margin-right:20px;width:20px;display:inline-block!important;height:20px;background:#000;-webkit-mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;mask:url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;transform:scale(1.5)}.user-img[data-v-a49a90e5]{margin:2px auto 0;width:65px}input[data-v-a49a90e5]{margin:0 auto;height:25px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}.container[data-v-99676a71]{padding:20px 20px 100px!important;display:flex;flex-direction:column;gap:20px}.settingsCard[data-v-99676a71]{background-color:#fff;padding:20px;border-radius:26px;align-items:center}.device[data-v-99676a71]{display:flex;align-items:center}h4[data-v-99676a71]{margin-left:20px;font-weight:700}.middle[data-v-99676a71]{flex:1}.left img[data-v-99676a71]{background-color:#f7f8f9;border-radius:20px;padding:10px}.divider[data-v-99676a71]{height:1px;background-color:#f0f0f0;margin:20px 0}.moreFooter[data-v-99676a71]{display:flex;align-items:center;justify-content:space-between;padding:0 10px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapni/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.119",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/TapniAuth.umd.js",
|
|
6
6
|
"module": "./dist/TapniAuth.es.js",
|
|
@@ -32,16 +32,19 @@
|
|
|
32
32
|
"@capacitor/device": "^5.0.6",
|
|
33
33
|
"@capacitor/preferences": "^5.0.6",
|
|
34
34
|
"@codetrix-studio/capacitor-google-auth": "^3.3.6",
|
|
35
|
+
"@otplib/preset-browser": "^12.0.1",
|
|
35
36
|
"@recognizebv/capacitor-plugin-msauth": "^3.5.1",
|
|
36
|
-
"@tapni/capacitor-reactive-localstorage-vue3": "^0.0.
|
|
37
|
+
"@tapni/capacitor-reactive-localstorage-vue3": "^0.0.15",
|
|
37
38
|
"@tapni/styles": "^0.0.3",
|
|
38
39
|
"await-to-js": "^3.0.0",
|
|
39
40
|
"axios": "^1.6.5",
|
|
41
|
+
"buffer": "^6.0.3",
|
|
40
42
|
"jwt-decode": "^4.0.0",
|
|
41
43
|
"qr-code-styling": "^1.6.0-rc.1",
|
|
42
44
|
"vue": "^3.3.11",
|
|
43
45
|
"vue-cookies": "^1.8.3",
|
|
44
|
-
"vue-router": "^4.2.5"
|
|
46
|
+
"vue-router": "^4.2.5",
|
|
47
|
+
"vuex": "^4.0.2"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
50
|
"@vitejs/plugin-vue": "^4.5.2",
|
package/src/App.vue
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { RouterView } from 'vue-router'
|
|
3
|
-
|
|
3
|
+
// add Buffer globally
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
5
|
+
import OTP from "@/components/OTP.vue";
|
|
6
|
+
window.Buffer = Buffer;
|
|
4
7
|
document.addEventListener('DOMContentLoaded', function() {
|
|
5
8
|
const recaptchaScript = document.createElement('script');
|
|
6
9
|
recaptchaScript.src = `https://www.google.com/recaptcha/api.js?render=${import.meta.env.VITE_GOOGLE_RECAPTCHA_SITE_KEY}`;
|
|
@@ -25,11 +28,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
25
28
|
<Language v-if="!isModal" />
|
|
26
29
|
<SSO v-if="!isModal" />
|
|
27
30
|
<SSOPick v-if="!isModal" />
|
|
31
|
+
<OTP />
|
|
28
32
|
|
|
29
33
|
<AuthWelcome v-if="initialized && renderView === 'AuthWelcome'" />
|
|
30
34
|
<AuthLogin v-else-if="initialized && renderView === 'AuthLogin'" :isModal="isModal" />
|
|
31
35
|
<AuthRegister v-else-if="initialized && renderView === 'AuthRegister'" :isModal="isModal" />
|
|
32
36
|
<AuthVerify v-else-if="initialized && renderView === 'AuthVerify'" :isModal="isModal" />
|
|
37
|
+
<AuthMFA v-else-if="initialized && renderView === 'AuthMFA'" :isModal="isModal" :payload="payload" />
|
|
33
38
|
<AuthReset v-else-if="initialized && renderView === 'AuthReset'" />
|
|
34
39
|
<AuthCallback v-else-if="initialized && renderView === 'AuthCallback'" />
|
|
35
40
|
<RouterView v-else-if="display !== 'npm'" />
|
|
@@ -80,32 +85,37 @@ import AuthWelcome from "@/views/Welcome.vue";
|
|
|
80
85
|
import AuthLogin from "@/views/Login.vue";
|
|
81
86
|
import AuthRegister from "@/views/Register.vue";
|
|
82
87
|
import AuthVerify from "@/views/Verify.vue";
|
|
88
|
+
import AuthMFA from "@/views/MFA.vue";
|
|
83
89
|
import AuthReset from "@/views/Reset.vue";
|
|
84
90
|
import AuthCallback from "@/views/Callback.vue";
|
|
85
91
|
import ModalOverlay from "@/components/ModalOverlay.vue";
|
|
86
92
|
import SSO from "@/components/SSO.vue";
|
|
93
|
+
import OTP from "@/components/OTP.vue";
|
|
87
94
|
import SSOPick from "@/components/SSOPick.vue";
|
|
88
95
|
import {EventBus} from "./store/event-bus.js";
|
|
89
96
|
import AuthMixin from "@/mixins/auth.mixin.js";
|
|
90
97
|
import Language from "@/components/Language.vue";
|
|
98
|
+
import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
|
|
91
99
|
|
|
92
100
|
export default {
|
|
93
101
|
name: 'TapniAuth',
|
|
94
|
-
mixins: [AuthMixin],
|
|
102
|
+
mixins: [ReactiveStorage, AuthMixin],
|
|
95
103
|
data () {
|
|
96
104
|
return {
|
|
105
|
+
storeInterval: null,
|
|
97
106
|
isSetup: false
|
|
98
107
|
}
|
|
99
108
|
},
|
|
100
109
|
components: {
|
|
101
110
|
Language,
|
|
111
|
+
OTP,
|
|
102
112
|
SSOPick,
|
|
103
|
-
SSO, ModalOverlay, AuthCallback, AuthReset, AuthVerify, AuthRegister, AuthLogin, AuthWelcome
|
|
113
|
+
SSO, ModalOverlay, AuthCallback, AuthReset, AuthVerify, AuthMFA, AuthRegister, AuthLogin, AuthWelcome
|
|
104
114
|
},
|
|
105
115
|
props: {
|
|
106
|
-
|
|
116
|
+
viewProp: {
|
|
107
117
|
type: String,
|
|
108
|
-
default: ''
|
|
118
|
+
default: 'AuthWelcome'
|
|
109
119
|
},
|
|
110
120
|
isModal: {
|
|
111
121
|
type: Boolean,
|
|
@@ -114,6 +124,22 @@ export default {
|
|
|
114
124
|
appLang: {
|
|
115
125
|
type: String,
|
|
116
126
|
default: 'en'
|
|
127
|
+
},
|
|
128
|
+
payload: {
|
|
129
|
+
type: Object,
|
|
130
|
+
default: {}
|
|
131
|
+
},
|
|
132
|
+
options: {
|
|
133
|
+
type: Object,
|
|
134
|
+
default: {
|
|
135
|
+
'token': '',
|
|
136
|
+
'refreshTokens': '',
|
|
137
|
+
'username': '',
|
|
138
|
+
'UserId': '',
|
|
139
|
+
'verifyEmail': '',
|
|
140
|
+
'subdomain': '',
|
|
141
|
+
'localUser': ''
|
|
142
|
+
}
|
|
117
143
|
}
|
|
118
144
|
},
|
|
119
145
|
computed: {
|
|
@@ -122,28 +148,35 @@ export default {
|
|
|
122
148
|
}
|
|
123
149
|
},
|
|
124
150
|
async mounted() {
|
|
151
|
+
console.log('eey');
|
|
125
152
|
this.applyBgStyle()
|
|
153
|
+
this.$store.commit('setView', this.viewProp);
|
|
126
154
|
|
|
127
155
|
EventBus.$on('ssoEvent', this.ssoOutgoingEvent)
|
|
128
156
|
EventBus.$on('ssoLogout',(data) => this.logout(data.refreshToken))
|
|
129
157
|
EventBus.$on('getLoggedInAccounts',(data) => this.getLoggedInAccounts(data))
|
|
130
|
-
EventBus.$on('refreshTokenAction',(data) => this.refreshTokenAction({...data, storage: this.$
|
|
158
|
+
EventBus.$on('refreshTokenAction',(data) => this.refreshTokenAction({...data, storage: this.$storex}))
|
|
131
159
|
EventBus.$on('switchAccount',(data) => this.switchAccount(data))
|
|
132
160
|
EventBus.$on('setToken',(data) => this.setToken(data))
|
|
133
161
|
},
|
|
134
162
|
methods: {
|
|
135
163
|
async init () {
|
|
164
|
+
console.log('initt');
|
|
165
|
+
|
|
166
|
+
// Set $storage into vuex $storex
|
|
167
|
+
this.$store.commit('setStorage', this.storage);
|
|
168
|
+
|
|
136
169
|
// Make sure the function is called just once
|
|
137
170
|
if (this.isSetup) return;
|
|
138
171
|
this.isSetup = true;
|
|
139
172
|
|
|
140
|
-
this.setToken(this.$
|
|
173
|
+
this.setToken(this.$storex.token);
|
|
141
174
|
const refreshTokens = this.getRefreshTokens();
|
|
142
175
|
this.setRefreshToken(refreshTokens[0]);
|
|
143
176
|
await this.getLoggedInAccounts(refreshTokens);
|
|
144
177
|
|
|
145
178
|
// Let App know that the auth is ready
|
|
146
|
-
this.$emit('ssoLibraryReady', this.$
|
|
179
|
+
this.$emit('ssoLibraryReady', this.$storex);
|
|
147
180
|
},
|
|
148
181
|
ssoOutgoingEvent (data) {
|
|
149
182
|
this.$emit('ssoEvent', data)
|
|
@@ -166,13 +199,24 @@ export default {
|
|
|
166
199
|
display () {
|
|
167
200
|
this.applyBgStyle()
|
|
168
201
|
},
|
|
169
|
-
'
|
|
170
|
-
if (nv
|
|
202
|
+
'storageReady.value' (nv) {
|
|
203
|
+
if (nv) {
|
|
171
204
|
// Initialize Library after all event listeners & storage are set
|
|
172
205
|
this.$nextTick(() => {
|
|
173
206
|
this.init()
|
|
174
207
|
})
|
|
175
208
|
}
|
|
209
|
+
},
|
|
210
|
+
'$storex': {
|
|
211
|
+
handler(nv) {
|
|
212
|
+
clearInterval(this.storeInterval);
|
|
213
|
+
this.storeInterval = setTimeout(() => {
|
|
214
|
+
Object.keys(nv).forEach(key => {
|
|
215
|
+
this.storage[key] = nv[key];
|
|
216
|
+
});
|
|
217
|
+
}, 250)
|
|
218
|
+
},
|
|
219
|
+
deep: true
|
|
176
220
|
}
|
|
177
221
|
}
|
|
178
222
|
}
|
|
@@ -185,7 +229,7 @@ html * {
|
|
|
185
229
|
|
|
186
230
|
#bodyId {
|
|
187
231
|
padding-top: 3%;
|
|
188
|
-
max-width:
|
|
232
|
+
max-width: 667px !important;
|
|
189
233
|
margin: auto;
|
|
190
234
|
height: 95%!important;
|
|
191
235
|
margin-top: 1.5%;
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
// EventBus.$on('toggleAddAccountModal', this.toggleModal)
|
|
37
37
|
// EventBus.$on("toggleAccountSettingsModal", this.toggleModal);
|
|
38
38
|
EventBus.$on("toggleSSOLanguageModal", this.toggleModal);
|
|
39
|
+
EventBus.$on("toggleOTPModal", this.toggleModal);
|
|
39
40
|
EventBus.$on("toggleSSOModal", this.toggleModal);
|
|
40
41
|
EventBus.$on("toggleSSOPickModal", this.toggleModal);
|
|
41
42
|
},
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form
|
|
3
|
+
@submit.prevent="submit"
|
|
4
|
+
class="menu-wrapper menu-light menu-modal center-text activate-page"
|
|
5
|
+
:class="{ 'active-menu': toggle }"
|
|
6
|
+
style="height: auto; margin-top: -172.5px"
|
|
7
|
+
>
|
|
8
|
+
<a
|
|
9
|
+
@click="forceClose"
|
|
10
|
+
class="color-black pull-right pointer"
|
|
11
|
+
style="margin-top: 5px; position: absolute; right: 5px"
|
|
12
|
+
>
|
|
13
|
+
<i class="font-17 color-black">
|
|
14
|
+
<img
|
|
15
|
+
src="https://cdn.tapni.co/icons/down-arrow.png"
|
|
16
|
+
class="responsive-image"
|
|
17
|
+
style="width: 45%"
|
|
18
|
+
/>
|
|
19
|
+
</i>
|
|
20
|
+
</a>
|
|
21
|
+
<img
|
|
22
|
+
:src="'https://cdn.tapni.co/icons/padlock.png'"
|
|
23
|
+
class="padlock-img small-bottom"
|
|
24
|
+
/>
|
|
25
|
+
<h3 class="bold center-text color-black half-top half-bottom">
|
|
26
|
+
{{ ssoLang[appLanguage].otp_title }}
|
|
27
|
+
</h3>
|
|
28
|
+
<p class="half-top full-bottom padding-left padding-right" v-html="ssoLang[appLanguage].otp_subtitle"></p>
|
|
29
|
+
<div>
|
|
30
|
+
<input
|
|
31
|
+
type="text"
|
|
32
|
+
v-model="otp"
|
|
33
|
+
:placeholder="ssoLang[appLanguage].otp_code"
|
|
34
|
+
class="edit-input h-40 lh-40"
|
|
35
|
+
style="width: 80%"
|
|
36
|
+
required
|
|
37
|
+
@keydown.space.prevent
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<button
|
|
42
|
+
type="submit"
|
|
43
|
+
class="button black-button white-button button-full"
|
|
44
|
+
style="margin: 0 auto; margin-top: 25px; margin-bottom: 30px"
|
|
45
|
+
>
|
|
46
|
+
<span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
|
|
47
|
+
<span v-else class="button--loading button__loader"></span>
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
<p class="close-text center-text half-top color-black">
|
|
51
|
+
<span v-html="ssoLang[this.appLanguage].otp_p1"></span>
|
|
52
|
+
<a href="mailto:support@tapni.com?subject=MFA Authentication Problem"> support@tapni.com</a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
</form>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
import { EventBus } from "../store/event-bus.js";
|
|
60
|
+
import AuthMixin from "@/mixins/auth.mixin.js";
|
|
61
|
+
export default {
|
|
62
|
+
name: "OTP",
|
|
63
|
+
mixins: [AuthMixin],
|
|
64
|
+
data() {
|
|
65
|
+
return {
|
|
66
|
+
toggle: false,
|
|
67
|
+
otp: "",
|
|
68
|
+
loading: false,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
mounted() {
|
|
72
|
+
EventBus.$on("toggleOTPModal", this.toggleModal);
|
|
73
|
+
EventBus.$on("closeModal", () => {
|
|
74
|
+
this.toggle = false;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
beforeDestroy() {
|
|
78
|
+
EventBus["_events"]["toggleOTPModal"].pop();
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
forceClose() {
|
|
82
|
+
EventBus.$emit("closeModal");
|
|
83
|
+
},
|
|
84
|
+
close() {
|
|
85
|
+
this.toggleModal();
|
|
86
|
+
},
|
|
87
|
+
async submit() {
|
|
88
|
+
if (!this.otp || this.otp.length !== 6) {
|
|
89
|
+
return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.loading = true;
|
|
93
|
+
EventBus.$emit('otpSubmitted', this.otp);
|
|
94
|
+
EventBus.$emit("toggleOTPModal")
|
|
95
|
+
this.loading = false;
|
|
96
|
+
},
|
|
97
|
+
toggleModal() {
|
|
98
|
+
this.toggle = !this.toggle;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style scoped>
|
|
105
|
+
.sso-img {
|
|
106
|
+
margin: 0 auto;
|
|
107
|
+
margin-top: 2px;
|
|
108
|
+
width: 35px;
|
|
109
|
+
}
|
|
110
|
+
input {
|
|
111
|
+
margin: 0 auto;
|
|
112
|
+
height: 25px;
|
|
113
|
+
}
|
|
114
|
+
.padlock-img {
|
|
115
|
+
margin: 0 auto;
|
|
116
|
+
margin-top: 2px;
|
|
117
|
+
margin-bottom: 15px;
|
|
118
|
+
width: 40px;
|
|
119
|
+
}
|
|
120
|
+
</style>
|
package/src/install.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import App from "./App.vue";
|
|
2
|
-
import Api from './services/Api'
|
|
3
2
|
import AuthMixin from './mixins/auth.mixin.js'
|
|
4
3
|
|
|
5
|
-
|
|
6
4
|
// Export the component by default
|
|
7
5
|
export default {
|
|
8
6
|
TapniAuth: App,
|
|
9
7
|
AuthMixin: AuthMixin,
|
|
10
8
|
install: (app, options) => {
|
|
11
|
-
if (options && options.API_ROOT) Api.setApiRootFromOptions(options.API_ROOT);
|
|
12
9
|
app.component('TapniAuth', App);
|
|
13
10
|
}
|
|
14
11
|
};
|
package/src/main.js
CHANGED
|
@@ -3,29 +3,21 @@ import { createApp } from 'vue'
|
|
|
3
3
|
import RootApp from './App.vue'
|
|
4
4
|
import router from './router'
|
|
5
5
|
import VueCookies from 'vue-cookies'
|
|
6
|
-
import ReactiveStorage from '@tapni/capacitor-reactive-localstorage-vue3'
|
|
7
6
|
import { App } from '@capacitor/app';
|
|
8
7
|
import { Browser } from '@capacitor/browser';
|
|
8
|
+
import store from './store/store.js';
|
|
9
9
|
|
|
10
10
|
const app = createApp(RootApp)
|
|
11
11
|
|
|
12
12
|
app.config.productionTip = false
|
|
13
13
|
|
|
14
|
-
app.use(ReactiveStorage, {
|
|
15
|
-
'token': '',
|
|
16
|
-
'refreshTokens': '',
|
|
17
|
-
'username': '',
|
|
18
|
-
'UserId': '',
|
|
19
|
-
'verifyEmail': '',
|
|
20
|
-
'subdomain': '',
|
|
21
|
-
'localUser': ''
|
|
22
|
-
});
|
|
23
|
-
|
|
24
14
|
// Cookies
|
|
25
15
|
app.use(VueCookies)
|
|
26
16
|
|
|
27
17
|
app.use(router)
|
|
28
18
|
|
|
19
|
+
app.use(store)
|
|
20
|
+
|
|
29
21
|
app.mount('#app')
|
|
30
22
|
|
|
31
23
|
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
computed: {
|
|
14
14
|
displayAppleLogin () {
|
|
15
|
-
return (
|
|
15
|
+
return ((Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'ios') || (!Capacitor.isNativePlatform() && this.isiOS));
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
methods: {
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
// Code Login
|
|
34
34
|
if (this.display === 'popup') user.response_type = 'code';
|
|
35
35
|
|
|
36
|
-
const [err, response] = await to(AuthService.appleSDK(user.response, this.$
|
|
36
|
+
const [err, response] = await to(AuthService.appleSDK(user.response, this.$storex))
|
|
37
37
|
if (err) {
|
|
38
38
|
this.appleLoad = false
|
|
39
39
|
EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
|