@tapni/auth 1.0.4 → 1.0.6-3.dev
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/README.md +2 -0
- package/dist/.vite/manifest.json +23 -40
- package/dist/.well-known/assetlinks.json +10 -12
- package/dist/.well-known/microsoft-identity-association.json +5 -5
- package/dist/Apps-XNA4_3B4.js +109 -0
- package/dist/Billing-Br0-fHed.js +256 -0
- package/dist/CustomApp-CrlbYDOm.js +83 -0
- package/dist/QR-Bvqb60-E.js +41 -0
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +49 -23
- package/dist/{install-BzPu9V_c.js → install-7FOVy8Ol.js} +6328 -4767
- package/dist/site.webmanifest +11 -1
- package/dist/style.css +1 -1
- package/dist/{web-IFGkBi0t.js → web-UrTMimK1.js} +2 -2
- package/package.json +65 -55
- package/src/.prettierrc.json +16 -0
- package/src/App.vue +329 -259
- package/src/eslint.config.js +15 -0
- package/src/index.js +4 -0
- package/src/install.js +9 -10
- package/src/main.js +54 -58
- package/src/mixins/apple.mixin.js +56 -54
- package/src/mixins/auth.mixin.js +3 -2
- package/src/mixins/global.mixin.js +3 -3
- package/src/mixins/google.mixin.js +53 -54
- package/src/mixins/microsoft.mixin.js +2 -8
- package/src/mixins/okta.mixin.js +2 -2
- package/src/mixins/qr-auth.mixin.js +111 -107
- package/src/mixins/saml.mixin.js +82 -45
- package/src/router/index.js +6 -6
- package/src/routes.js +7 -1
- package/src/services/Api.js +56 -58
- package/src/services/AuthService.js +13 -9
- package/src/services/CompanyService.js +10 -10
- package/src/services/DeviceService.js +3 -3
- package/src/services/MetadataService.js +10 -0
- package/src/services/UserService.js +48 -45
- package/src/services/UtilService.js +317 -225
- package/src/store/auth.js +485 -549
- package/src/store/constants.js +2 -2
- package/src/store/event-bus.js +22 -22
- package/src/store/locales/cn.js +476 -458
- package/src/store/locales/de.js +478 -517
- package/src/store/locales/en.js +454 -512
- package/src/store/locales/es.js +477 -524
- package/src/store/locales/fr.js +477 -516
- package/src/store/locales/it.js +477 -514
- package/src/store/locales/ja.js +488 -0
- package/src/store/locales/kr.js +477 -491
- package/src/store/locales/lang.js +51 -43
- package/src/store/locales/pt.js +488 -0
- package/src/store/locales/sr.js +477 -492
- package/src/store/locales/tr.js +477 -487
- package/src/store/store.js +6 -6
- package/src/views/Account.vue +36 -8
- package/src/views/Apps.vue +17 -30
- package/src/views/Billing.vue +538 -0
- package/src/views/Callback.vue +36 -33
- package/src/views/CustomApp.vue +14 -39
- package/src/views/General.vue +151 -184
- package/src/views/Login.vue +173 -161
- package/src/views/Register.vue +2 -12
- package/src/views/Reset.vue +132 -135
- package/src/views/Security.vue +13 -7
- package/src/views/Verify.vue +153 -151
- package/src/views/Welcome.vue +85 -71
- package/dist/Account-zep_QUuI.js +0 -153
- package/dist/Apps-B9XB7Z7q.js +0 -112
- package/dist/CustomApp-BzUsyycz.js +0 -112
- package/dist/General-DkcdjPYQ.js +0 -477
- package/dist/QR-PW6cAG5j.js +0 -41
- package/dist/index.css +0 -193
- package/dist/web-AXRKjAOB.js +0 -92
- package/src/components/DELETE_Language.vue +0 -168
- package/src/components/DELETE_LinkIcon.vue +0 -288
- package/src/components/DELETE_ModalOverlay.vue +0 -68
- package/src/components/DELETE_OTP.vue +0 -105
- package/src/components/SSO.vue +0 -126
- package/src/components/SSOPick.vue +0 -166
- package/src/mixins/DELETE_mfa-auth.mixin.js +0 -53
- package/src/mixins/facebook.mixin.js +0 -78
package/src/views/General.vue
CHANGED
|
@@ -1,192 +1,159 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
>
|
|
82
|
-
<span v-if="!loading">{{ ssoLang[appLanguage].save }}</span>
|
|
83
|
-
<span v-else class="button--loading button__loader"></span>
|
|
84
|
-
</button>
|
|
85
|
-
</form>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
2
|
+
<div class="page-login content-boxed content-boxed-padding tapni-auth-general">
|
|
3
|
+
<a v-if="isModal" @click="close" class="color-black pull-right pointer" style="margin-top: 0px; position: absolute; right: -20px; text-align: right">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 35%" />
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<div class="subheaderContainer full-top">
|
|
9
|
+
<!-- Back Button -->
|
|
10
|
+
<div v-if="isModal" class="pointer left-button" @click="$emit('update:viewProp', 'AuthAccount')">
|
|
11
|
+
<img :src="getIcon('arrow-gray-right.svg')" height="20" width="20" class="btn-icon" style="rotate: 180deg" />
|
|
12
|
+
</div>
|
|
13
|
+
<router-link v-else to="/account" class="button gray-button pointer left-button">
|
|
14
|
+
<img :src="getIcon('arrow-gray-right.svg')" height="20" width="20" class="btn-icon" style="rotate: 180deg" />
|
|
15
|
+
</router-link>
|
|
16
|
+
|
|
17
|
+
<!-- Centered Text -->
|
|
18
|
+
<h2 class="center-text" style="flex-grow: 1; text-align: center; margin: 0; font-weight: 600">
|
|
19
|
+
{{ ssoLang[appLanguage].general }}
|
|
20
|
+
</h2>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="container left-text">
|
|
24
|
+
<p class="center-text">{{ ssoLang[appLanguage].general_p }}</p>
|
|
25
|
+
|
|
26
|
+
<form class="full-top" @submit.prevent="submitGeneralUpdate">
|
|
27
|
+
<h3 class="full-top bold small-bottom">{{ ssoLang[appLanguage].personal_details }}</h3>
|
|
28
|
+
|
|
29
|
+
<input type="text" v-model="account.name" :placeholder="ssoLang[appLanguage].name" class="edit-input h-40 lh-40 small-bottom" required style="width: 100%" />
|
|
30
|
+
|
|
31
|
+
<input disabled type="email" v-model="account.email" :placeholder="ssoLang[appLanguage].email" class="bg-white edit-input h-40 lh-40 small-bottom" required style="width: 100%" />
|
|
32
|
+
|
|
33
|
+
<h3 class="full-top bold">{{ ssoLang[appLanguage].app_region }}</h3>
|
|
34
|
+
<VueSelect
|
|
35
|
+
v-if="account.billing"
|
|
36
|
+
v-model="account.billing.region"
|
|
37
|
+
:options="[
|
|
38
|
+
{ label: 'United States', value: 'us' },
|
|
39
|
+
{ label: 'United Kingdom', value: 'uk' },
|
|
40
|
+
{ label: 'European Union', value: 'eu' },
|
|
41
|
+
{ label: 'Mexico', value: 'mx' },
|
|
42
|
+
{ label: 'Mauritius', value: 'mu' },
|
|
43
|
+
{ label: 'Colombia', value: 'co' },
|
|
44
|
+
{ label: 'Serbia', value: 'sr' },
|
|
45
|
+
{ label: 'Singapore', value: 'sg' },
|
|
46
|
+
{ label: 'China', value: 'cn' }
|
|
47
|
+
]"
|
|
48
|
+
:isClearable="false"
|
|
49
|
+
placeholder="Select region"
|
|
50
|
+
/>
|
|
51
|
+
<p v-if="false">Default currency for this region is {{ account.billing?.currency?.toUpperCase() }}</p>
|
|
52
|
+
|
|
53
|
+
<h3 class="full-top bold">{{ ssoLang[appLanguage].app_language }}</h3>
|
|
54
|
+
<VueSelect
|
|
55
|
+
v-model="account.lang"
|
|
56
|
+
:options="[
|
|
57
|
+
{ label: ssoLang[appLanguage].english, value: 'en' },
|
|
58
|
+
{ label: ssoLang[appLanguage].german, value: 'de' },
|
|
59
|
+
{ label: ssoLang[appLanguage].spanish, value: 'es' },
|
|
60
|
+
{ label: ssoLang[appLanguage].italian, value: 'it' },
|
|
61
|
+
{ label: ssoLang[appLanguage].french, value: 'fr' },
|
|
62
|
+
{ label: ssoLang[appLanguage].turkish, value: 'tr' },
|
|
63
|
+
{ label: ssoLang[appLanguage].serbian, value: 'sr' },
|
|
64
|
+
{ label: ssoLang[appLanguage].korean, value: 'kr' },
|
|
65
|
+
{ label: ssoLang[appLanguage].chinese, value: 'cn' },
|
|
66
|
+
{ label: ssoLang[appLanguage].portuguese, value: 'pt' },
|
|
67
|
+
{ label: ssoLang[appLanguage].japanese, value: 'ja' }
|
|
68
|
+
]"
|
|
69
|
+
:isClearable="false"
|
|
70
|
+
placeholder="Select language"
|
|
71
|
+
/>
|
|
72
|
+
<p>Translate the app on your preferred language.</p>
|
|
73
|
+
|
|
74
|
+
<button type="submit" class="button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer">
|
|
75
|
+
<span v-if="!loading">{{ ssoLang[appLanguage].save }}</span>
|
|
76
|
+
<span v-else class="button--loading button__loader"></span>
|
|
77
|
+
</button>
|
|
78
|
+
</form>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
88
81
|
</template>
|
|
89
82
|
|
|
90
|
-
|
|
91
83
|
<script>
|
|
92
|
-
import AuthMixin from
|
|
93
|
-
import
|
|
94
|
-
import to from
|
|
95
|
-
import {EventBus} from
|
|
96
|
-
import VueSelect from
|
|
84
|
+
import AuthMixin from '../mixins/auth.mixin';
|
|
85
|
+
import UserService from '../services/UserService';
|
|
86
|
+
import to from 'await-to-js';
|
|
87
|
+
import { EventBus } from '@/store/event-bus.js';
|
|
88
|
+
import VueSelect from 'vue3-select-component';
|
|
97
89
|
|
|
98
90
|
export default {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
91
|
+
name: 'AuthGeneral',
|
|
92
|
+
mixins: [AuthMixin],
|
|
93
|
+
components: {
|
|
94
|
+
VueSelect
|
|
95
|
+
},
|
|
96
|
+
props: {
|
|
97
|
+
isModal: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false
|
|
100
|
+
},
|
|
101
|
+
payload: {
|
|
102
|
+
type: Object,
|
|
103
|
+
default: {}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
data() {
|
|
107
|
+
return {
|
|
108
|
+
loading: false
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
watch: {
|
|
112
|
+
'account.lang': {
|
|
113
|
+
handler(newLang) {
|
|
114
|
+
if (newLang) {
|
|
115
|
+
this.updateLang(newLang);
|
|
116
|
+
if (this.display === 'npm') {
|
|
117
|
+
this.$store.commit('setLanguage', newLang);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
immediate: true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
async mounted() {
|
|
125
|
+
if (!this.isLoggedIn) this.$router.push('/login');
|
|
126
|
+
await this.getAccountSettings();
|
|
127
|
+
},
|
|
128
|
+
methods: {
|
|
129
|
+
close() {
|
|
130
|
+
EventBus.$emit('ssoEvent', { name: 'toggleAuthModal', data: true });
|
|
131
|
+
},
|
|
132
|
+
async submitGeneralUpdate() {
|
|
133
|
+
this.loading = true;
|
|
134
|
+
console.log(this.account);
|
|
135
|
+
const data = {
|
|
136
|
+
name: this.account.name,
|
|
137
|
+
lang: this.account.lang,
|
|
138
|
+
email: this.account.email,
|
|
139
|
+
billing: this.account.billing
|
|
140
|
+
? {
|
|
141
|
+
region: this.account.billing.region
|
|
142
|
+
}
|
|
143
|
+
: undefined
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const [err, response] = await to(UserService.updateAccount(data));
|
|
147
|
+
|
|
148
|
+
if (err) {
|
|
149
|
+
this.errorHandler(err);
|
|
150
|
+
} else if (response.data.success) {
|
|
151
|
+
this.successSnack(this.ssoLang[this.appLanguage].profile_update_success);
|
|
152
|
+
await this.getAccountSettings();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
this.loading = false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
136
158
|
};
|
|
137
159
|
</script>
|
|
138
|
-
|
|
139
|
-
<style scoped>
|
|
140
|
-
:deep(.vue-select) {
|
|
141
|
-
padding: 5px 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:deep(.vue-select .dropdown-icon) {
|
|
145
|
-
color: #1d1d1d;
|
|
146
|
-
width: 25px!important;
|
|
147
|
-
height: 25px!important;
|
|
148
|
-
}
|
|
149
|
-
:deep(.vue-select .menu-option:hover) {
|
|
150
|
-
background-color: #D9D9D9;
|
|
151
|
-
}
|
|
152
|
-
:deep(.vue-select .menu-option.focused) {
|
|
153
|
-
background-color: #f4f4f4;
|
|
154
|
-
}
|
|
155
|
-
:deep(.vue-select .menu-option) {
|
|
156
|
-
border-bottom: 1px solid #D9D9D9;
|
|
157
|
-
font-size: 15px;
|
|
158
|
-
color: #151515;
|
|
159
|
-
}
|
|
160
|
-
:deep(.vue-select .menu-option:last-child) {
|
|
161
|
-
border-bottom: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
:deep(.vue-select .menu) {
|
|
165
|
-
border-radius: 10px;
|
|
166
|
-
border: none;
|
|
167
|
-
}
|
|
168
|
-
:deep(.vue-select .control.focused) {
|
|
169
|
-
border: none;
|
|
170
|
-
box-shadow: none;
|
|
171
|
-
}
|
|
172
|
-
:deep(.vue-select .control) {
|
|
173
|
-
min-height: 54px!important;
|
|
174
|
-
background-color: #F4F4F4;
|
|
175
|
-
border: none;
|
|
176
|
-
border-radius: 10px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
:deep(.vue-select .menu-option.selected) {
|
|
180
|
-
background-color: #E4E4E4;
|
|
181
|
-
}
|
|
182
|
-
:deep(.vue-select .indicators-container) {
|
|
183
|
-
padding: 5px 15px!important
|
|
184
|
-
}
|
|
185
|
-
:deep(.vue-select .value-container) {
|
|
186
|
-
padding: 5px 15px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
:deep(.vue-select .menu-option) {
|
|
190
|
-
background-color: #f4f4f4;
|
|
191
|
-
}
|
|
192
|
-
</style>
|