@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.
Files changed (81) hide show
  1. package/README.md +2 -0
  2. package/dist/.vite/manifest.json +23 -40
  3. package/dist/.well-known/assetlinks.json +10 -12
  4. package/dist/.well-known/microsoft-identity-association.json +5 -5
  5. package/dist/Apps-XNA4_3B4.js +109 -0
  6. package/dist/Billing-Br0-fHed.js +256 -0
  7. package/dist/CustomApp-CrlbYDOm.js +83 -0
  8. package/dist/QR-Bvqb60-E.js +41 -0
  9. package/dist/TapniAuth.es.js +1 -1
  10. package/dist/TapniAuth.umd.js +49 -23
  11. package/dist/{install-BzPu9V_c.js → install-7FOVy8Ol.js} +6328 -4767
  12. package/dist/site.webmanifest +11 -1
  13. package/dist/style.css +1 -1
  14. package/dist/{web-IFGkBi0t.js → web-UrTMimK1.js} +2 -2
  15. package/package.json +65 -55
  16. package/src/.prettierrc.json +16 -0
  17. package/src/App.vue +329 -259
  18. package/src/eslint.config.js +15 -0
  19. package/src/index.js +4 -0
  20. package/src/install.js +9 -10
  21. package/src/main.js +54 -58
  22. package/src/mixins/apple.mixin.js +56 -54
  23. package/src/mixins/auth.mixin.js +3 -2
  24. package/src/mixins/global.mixin.js +3 -3
  25. package/src/mixins/google.mixin.js +53 -54
  26. package/src/mixins/microsoft.mixin.js +2 -8
  27. package/src/mixins/okta.mixin.js +2 -2
  28. package/src/mixins/qr-auth.mixin.js +111 -107
  29. package/src/mixins/saml.mixin.js +82 -45
  30. package/src/router/index.js +6 -6
  31. package/src/routes.js +7 -1
  32. package/src/services/Api.js +56 -58
  33. package/src/services/AuthService.js +13 -9
  34. package/src/services/CompanyService.js +10 -10
  35. package/src/services/DeviceService.js +3 -3
  36. package/src/services/MetadataService.js +10 -0
  37. package/src/services/UserService.js +48 -45
  38. package/src/services/UtilService.js +317 -225
  39. package/src/store/auth.js +485 -549
  40. package/src/store/constants.js +2 -2
  41. package/src/store/event-bus.js +22 -22
  42. package/src/store/locales/cn.js +476 -458
  43. package/src/store/locales/de.js +478 -517
  44. package/src/store/locales/en.js +454 -512
  45. package/src/store/locales/es.js +477 -524
  46. package/src/store/locales/fr.js +477 -516
  47. package/src/store/locales/it.js +477 -514
  48. package/src/store/locales/ja.js +488 -0
  49. package/src/store/locales/kr.js +477 -491
  50. package/src/store/locales/lang.js +51 -43
  51. package/src/store/locales/pt.js +488 -0
  52. package/src/store/locales/sr.js +477 -492
  53. package/src/store/locales/tr.js +477 -487
  54. package/src/store/store.js +6 -6
  55. package/src/views/Account.vue +36 -8
  56. package/src/views/Apps.vue +17 -30
  57. package/src/views/Billing.vue +538 -0
  58. package/src/views/Callback.vue +36 -33
  59. package/src/views/CustomApp.vue +14 -39
  60. package/src/views/General.vue +151 -184
  61. package/src/views/Login.vue +173 -161
  62. package/src/views/Register.vue +2 -12
  63. package/src/views/Reset.vue +132 -135
  64. package/src/views/Security.vue +13 -7
  65. package/src/views/Verify.vue +153 -151
  66. package/src/views/Welcome.vue +85 -71
  67. package/dist/Account-zep_QUuI.js +0 -153
  68. package/dist/Apps-B9XB7Z7q.js +0 -112
  69. package/dist/CustomApp-BzUsyycz.js +0 -112
  70. package/dist/General-DkcdjPYQ.js +0 -477
  71. package/dist/QR-PW6cAG5j.js +0 -41
  72. package/dist/index.css +0 -193
  73. package/dist/web-AXRKjAOB.js +0 -92
  74. package/src/components/DELETE_Language.vue +0 -168
  75. package/src/components/DELETE_LinkIcon.vue +0 -288
  76. package/src/components/DELETE_ModalOverlay.vue +0 -68
  77. package/src/components/DELETE_OTP.vue +0 -105
  78. package/src/components/SSO.vue +0 -126
  79. package/src/components/SSOPick.vue +0 -166
  80. package/src/mixins/DELETE_mfa-auth.mixin.js +0 -53
  81. package/src/mixins/facebook.mixin.js +0 -78
@@ -1,192 +1,159 @@
1
1
  <template>
2
- <div class="page-login content-boxed content-boxed-padding">
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
- <router-link to="/account" class="button gray-button pointer left-button">
11
- <img
12
- :src="getIcon('arrow-gray-right.svg')"
13
- height="20"
14
- width="20"
15
- class="btn-icon"
16
- style="rotate: 180deg;"
17
- />
18
- </router-link>
19
-
20
- <!-- Centered Text -->
21
- <h2 class="center-text" style="flex-grow: 1; text-align: center; margin: 0; font-weight: 600;">
22
- {{ssoLang[appLanguage].general }}
23
- </h2>
24
- </div>
25
-
26
- <div class="container left-text">
27
- <p class="center-text">{{ssoLang[appLanguage].general_p }}</p>
28
-
29
- <form class="full-top" @submit.prevent="submitGeneralUpdate">
30
-
31
- <h3 class="full-top bold small-bottom">{{ssoLang[appLanguage].personal_details}}</h3>
32
-
33
- <input type="text" v-model="account.name" :placeholder="ssoLang[appLanguage].name"
34
- class="edit-input h-40 lh-40 small-bottom" required style="width: 100%"/>
35
-
36
- <input disabled type="email" v-model="account.email" :placeholder="ssoLang[appLanguage].email"
37
- class="bg-white edit-input h-40 lh-40 small-bottom" required style="width: 100%"/>
38
-
39
-
40
- <h3 class="full-top bold">{{ssoLang[appLanguage].app_region}}</h3>
41
- <VueSelect
42
- v-model="region"
43
- :options="[
44
- { label: 'United States', value: 'us' },
45
- { label: 'United Kingdom', value: 'uk' },
46
- { label: 'European Union', value: 'eu' },
47
- { label: 'Mexico', value: 'mx' },
48
- { label: 'Mauritius', value: 'mu' },
49
- { label: 'Colombia', value: 'co' },
50
- { label: 'Serbia', value: 'sr' },
51
- { label: 'China', value: 'cn' },
52
- ]"
53
- :isClearable="false"
54
- placeholder="Select region"
55
- />
56
- <p>Default currency for this region is {{account.billing?.currency?.toUpperCase()}}</p>
57
-
58
-
59
- <h3 class="full-top bold">{{ssoLang[appLanguage].app_language}}</h3>
60
- <VueSelect
61
- v-model="account.lang"
62
- :options="[
63
- { label: ssoLang[appLanguage].english, value: 'en' },
64
- { label: ssoLang[appLanguage].german, value: 'de' },
65
- { label: ssoLang[appLanguage].spanish, value: 'es' },
66
- { label: ssoLang[appLanguage].italian, value: 'it' },
67
- { label: ssoLang[appLanguage].french, value: 'fr' },
68
- { label: ssoLang[appLanguage].turkish, value: 'tr' },
69
- { label: ssoLang[appLanguage].serbian, value: 'sr' },
70
- { label: ssoLang[appLanguage].korean, value: 'kr' },
71
- { label: ssoLang[appLanguage].chinese, value: 'cn' },
72
- ]"
73
- :isClearable="false"
74
- placeholder="Select language"
75
- />
76
- <p>Translate the app on your preferred language.</p>
77
-
78
- <button
79
- type="submit"
80
- class="button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"
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 "../mixins/auth.mixin";
93
- import AuthService from '../services/AuthService'
94
- import to from "await-to-js";
95
- import {EventBus} from "@/store/event-bus.js";
96
- import VueSelect from "vue3-select-component";
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
- name: "AuthSecurity",
100
- mixins: [AuthMixin],
101
- components: {
102
- VueSelect
103
- },
104
- props: {
105
- payload: {
106
- type: Object,
107
- default: {}
108
- },
109
- },
110
- data () {
111
- return {
112
- loading: false,
113
- }
114
- },
115
- async mounted() {
116
- if (!this.isLoggedIn) this.$router.push('/login');
117
- },
118
- methods: {
119
- close () {
120
- EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
121
- },
122
- async submitGeneralUpdate () {
123
- if (this.password.length < 8) return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars)
124
-
125
- this.loading = true;
126
- const result = await this.newPassword({
127
-
128
- })
129
- if (result === true) {
130
- this.successSnack(this.ssoLang[this.appLanguage].password_change_success)
131
- this.changePassword = false;
132
- }
133
- this.loading = false;
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>