@tapni/auth 1.0.5 → 1.0.6-4.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 (78) hide show
  1. package/README.md +2 -0
  2. package/dist/.vite/manifest.json +16 -43
  3. package/dist/.well-known/assetlinks.json +10 -12
  4. package/dist/.well-known/microsoft-identity-association.json +5 -5
  5. package/dist/{Apps-DMds3Dv-.js → Apps-DRhdYq0_.js} +34 -34
  6. package/dist/Billing-DkXdzGvS.js +256 -0
  7. package/dist/CustomApp-Dw80xmqU.js +83 -0
  8. package/dist/QR-ByY4IUiV.js +41 -0
  9. package/dist/TapniAuth.es.js +1 -1
  10. package/dist/TapniAuth.umd.js +49 -23
  11. package/dist/{install-L-cxSovH.js → install-Cb6nCJn_.js} +6265 -4741
  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 +66 -55
  16. package/src/.prettierrc.json +16 -0
  17. package/src/App.vue +326 -269
  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 -57
  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 -5
  27. package/src/mixins/okta.mixin.js +1 -1
  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 +1 -1
  32. package/src/services/Api.js +56 -58
  33. package/src/services/AuthService.js +7 -9
  34. package/src/services/CompanyService.js +10 -10
  35. package/src/services/DeviceService.js +3 -3
  36. package/src/services/UserService.js +48 -45
  37. package/src/services/UtilService.js +317 -225
  38. package/src/store/auth.js +485 -549
  39. package/src/store/constants.js +2 -2
  40. package/src/store/event-bus.js +22 -22
  41. package/src/store/locales/cn.js +476 -458
  42. package/src/store/locales/de.js +478 -517
  43. package/src/store/locales/en.js +454 -513
  44. package/src/store/locales/es.js +477 -524
  45. package/src/store/locales/fr.js +477 -516
  46. package/src/store/locales/it.js +477 -514
  47. package/src/store/locales/ja.js +488 -0
  48. package/src/store/locales/kr.js +477 -491
  49. package/src/store/locales/lang.js +51 -43
  50. package/src/store/locales/pt.js +488 -0
  51. package/src/store/locales/sr.js +477 -492
  52. package/src/store/locales/tr.js +477 -487
  53. package/src/store/store.js +6 -6
  54. package/src/views/Account.vue +36 -8
  55. package/src/views/Billing.vue +464 -34
  56. package/src/views/Callback.vue +36 -33
  57. package/src/views/General.vue +151 -185
  58. package/src/views/Login.vue +2 -25
  59. package/src/views/Register.vue +2 -12
  60. package/src/views/Reset.vue +132 -135
  61. package/src/views/Security.vue +13 -7
  62. package/src/views/Verify.vue +153 -151
  63. package/src/views/Welcome.vue +85 -71
  64. package/dist/Account-Cuz87g_8.js +0 -153
  65. package/dist/Billing-BXlQEuNy.js +0 -113
  66. package/dist/CustomApp-CLCMXmMO.js +0 -83
  67. package/dist/General-dW73bMoR.js +0 -479
  68. package/dist/QR-D6ZGcPM0.js +0 -41
  69. package/dist/index.css +0 -193
  70. package/dist/web-AXRKjAOB.js +0 -92
  71. package/src/components/DELETE_Language.vue +0 -168
  72. package/src/components/DELETE_LinkIcon.vue +0 -288
  73. package/src/components/DELETE_ModalOverlay.vue +0 -68
  74. package/src/components/DELETE_OTP.vue +0 -105
  75. package/src/components/DELETE_SSO.vue +0 -120
  76. package/src/components/DELETE_SSOPick.vue +0 -166
  77. package/src/mixins/DELETE_mfa-auth.mixin.js +0 -53
  78. package/src/mixins/facebook.mixin.js +0 -78
@@ -1,288 +0,0 @@
1
- <template>
2
- <a
3
- class="disable-select"
4
- :class="linkStyle + (disabled ? ' opacity-50' : '')"
5
- :style="
6
- (editing ? 'cursor: move' : 'cursor: pointer') +
7
- '!important; overflow: visible; margin-top: 5px;'
8
- "
9
- >
10
-
11
- <span
12
- :class="{
13
- 'user-link-img': true,
14
- 'pulse pulse-border': pulse,
15
- 'link-drag': editing,
16
- }"
17
- :style="{ ...customLinkStyle?.linkIcon }"
18
- >
19
- <img
20
- v-if="!data.custom_icon && data.type !== 'customlink'"
21
- :src="'https://cdn.tapni.co/icons/' + data.type + '.png'"
22
- class="responsive-image"
23
- :alt="data.text"
24
- @load="$emit('loaded')"
25
- @error="$emit('loaded')"
26
- />
27
- <img
28
- v-else-if="
29
- !data.custom_icon && data.type === 'customlink' && linkAdding
30
- "
31
- :src="'https://cdn.tapni.co/icons/custom-icon-128.gif'"
32
- class="responsive-image"
33
- :alt="data.text"
34
- @load="$emit('loaded')"
35
- @error="$emit('loaded')"
36
- />
37
- <img
38
- v-else-if="
39
- !data.custom_icon && data.type === 'customlink' && !linkAdding
40
- "
41
- :src="'https://cdn.tapni.co/icons/customlink.png'"
42
- class="responsive-image"
43
- :alt="data.text"
44
- @load="$emit('loaded')"
45
- @error="$emit('loaded')"
46
- />
47
- <img
48
- v-else
49
- :src="data.style.custom_icon"
50
- style="border-radius: 22.46%"
51
- class="responsive-image"
52
- :alt="data.text"
53
- @load="$emit('loaded')"
54
- @error="$emit('loaded')"
55
- />
56
- </span>
57
-
58
- <span
59
- class="link-text link-drag color-black"
60
- :style="{ color: customLinkStyle?.color }"
61
- >
62
- {{ linkText }}
63
- </span>
64
- </a>
65
- </template>
66
-
67
- <script>
68
- import AuthMixin from '../mixins/auth.mixin';
69
-
70
- export default {
71
- name: "LinkIcon",
72
- mixins: [AuthMixin],
73
- props: {
74
- linkAdding: {
75
- type: Boolean,
76
- required: false,
77
- default: false,
78
- },
79
- hideExternalIcon: {
80
- type: Boolean,
81
- required: false,
82
- default: false,
83
- },
84
- switching: {
85
- type: Boolean,
86
- required: false,
87
- default: false,
88
- },
89
- pulse: {
90
- type: Boolean,
91
- required: false,
92
- default: false,
93
- },
94
- editing: {
95
- type: Boolean,
96
- required: false,
97
- default: true,
98
- },
99
- directPick: {
100
- type: Boolean,
101
- required: false,
102
- default: false,
103
- },
104
- disabled: {
105
- type: Boolean,
106
- required: false,
107
- default: false,
108
- },
109
- to: {
110
- type: String,
111
- required: false,
112
- default: "",
113
- },
114
- linkStyle: {
115
- type: String,
116
- required: false,
117
- default: "link-grid",
118
- },
119
- data: {
120
- type: Object,
121
- required: true,
122
- },
123
- customLinkStyle: {
124
- type: Object,
125
- required: false,
126
- default: () => {},
127
- },
128
- shareIconStyle: {
129
- type: Object,
130
- required: false,
131
- default: () => {},
132
- },
133
- },
134
- computed: {
135
- linkText() {
136
- if (this.appLanguage !== "en" && this.data.text) {
137
- return (
138
- this.ssoLang[this.appLanguage][
139
- "link_text_" +
140
- this.data.text.toLowerCase().trim().replace(/ /g, "_")
141
- ] || this.data.text
142
- );
143
- }
144
- return this.data.text;
145
- },
146
- },
147
- methods: {
148
- },
149
- };
150
- </script>
151
-
152
- <style>
153
- /* ********* */
154
- /* Link Grid */
155
- /* ********* */
156
- .link-grid,
157
- .user-link-img {
158
- width: 100%;
159
- display: inline-table;
160
- position: relative;
161
- }
162
-
163
- .link-grid {
164
- width: 30%;
165
- margin: 1.6%;
166
- padding: 1.6%;
167
- }
168
-
169
- .link-grid .user-link-img img {
170
- /* box-shadow: 0px 2px 10px rgba(200,200,200,0.8); */
171
- /* border: 1px solid #e8e8e8; */
172
- border-radius: 25% !important;
173
- }
174
-
175
- .link-grid .edit-icon {
176
- border-radius: 20px;
177
- right: -3%;
178
- top: -3%;
179
- position: absolute;
180
- z-index: 3;
181
- max-width: 23%;
182
- overflow: hidden;
183
- min-width: 30px;
184
- }
185
-
186
- .link-grid .direct-icon {
187
- border-radius: 20px;
188
- left: -3%;
189
- top: -3%;
190
- position: absolute;
191
- z-index: 555;
192
- max-width: 23%;
193
- overflow: hidden;
194
- min-width: 30px;
195
- }
196
-
197
- .link-grid .link-text {
198
- min-height: 20px;
199
- margin-top: 3px !important;
200
- display: block;
201
- text-align: center;
202
- line-height: normal;
203
- overflow-wrap: anywhere;
204
- }
205
-
206
- /* ********* */
207
- /* Link List */
208
- /* ********* */
209
- .link-list {
210
- width: 93%;
211
- max-height: 67px !important;
212
- margin: 0px auto;
213
- display: flex;
214
- border-radius: 15px !important;
215
- background-color: #ffffff;
216
- /* box-shadow: 0px 2px 5px rgba(0,0,0,0.15); */
217
- border: solid 1px #e8e8e8;
218
- position: relative;
219
- align-items: center;
220
- }
221
-
222
- .link-list .user-link-img {
223
- display: inline-block;
224
- width: 65px;
225
- /* box-shadow: 0px 3px 6px rgba(0,0,0,0.16); */
226
- border-radius: 25% !important;
227
- }
228
-
229
- .link-list .link-text {
230
- display: inline-block;
231
- padding: 18px 0% 17px 10%;
232
- font-size: 15px;
233
- font-weight: 500;
234
- white-space: nowrap;
235
- text-overflow: ellipsis;
236
- overflow: hidden;
237
- flex: 1;
238
- text-align: left;
239
- border-radius: 15px !important;
240
- }
241
-
242
- .link-list .edit-icon {
243
- border-radius: 20px;
244
- right: 7%;
245
- top: 30%;
246
- position: absolute;
247
- z-index: 3;
248
- width: 26px;
249
- overflow: hidden;
250
- }
251
-
252
- .link-list .switching {
253
- width: 45px;
254
- }
255
-
256
- .link-list .direct-icon {
257
- border-radius: 20px;
258
- left: -2%;
259
- top: -13%;
260
- position: absolute;
261
- z-index: 555;
262
- width: 26px;
263
- overflow: hidden;
264
- }
265
- /* ********* */
266
-
267
- .small {
268
- width: 22% !important;
269
- margin: 2% 4% 0%;
270
- padding: 0%;
271
- }
272
- .small .link-text {
273
- margin-top: 0px !important;
274
- font-size: 13px;
275
- }
276
-
277
- .linkExternal {
278
- margin-right: 20px;
279
- width: 20px;
280
- display: inline-block !important;
281
- height: 20px;
282
- background: black;
283
- -webkit-mask: url(https://cdn.tapni.co/icons/link-external.svg) no-repeat
284
- center;
285
- mask: url(https://cdn.tapni.co/icons/link-external.svg) no-repeat center;
286
- transform: scale(1.5);
287
- }
288
- </style>
@@ -1,68 +0,0 @@
1
- <template>
2
- <div
3
- :class="{ 'pointer delete-menu': true, 'delete-menu-active': toggle }"
4
- @click="toggleEmit"
5
- ></div>
6
-
7
- <!--
8
- <transition name="fade">
9
- <div v-if="toggle" class="pointer delete-menu" @click="toggleEmit"></div>
10
- </transition>
11
- -->
12
- </template>
13
-
14
- <script>
15
- import { EventBus } from "../store/event-bus";
16
- import AuthMixin from "../mixins/auth.mixin";
17
-
18
- export default {
19
- name: "ModalOverlay",
20
- mixins: [AuthMixin],
21
- data() {
22
- return {
23
- toggle: false,
24
- };
25
- },
26
- mounted() {
27
- EventBus.$on("closeModal", () => {
28
- this.toggle = false;
29
- window.document.body.style.overflow = "auto";
30
- window.document.body.style.height = "auto";
31
- });
32
- EventBus.$on("openModalOverlay", () => {
33
- this.toggle = true;
34
- });
35
- // EventBus.$on('togglePasswordModal', this.toggleModal)
36
- // EventBus.$on('toggleAddAccountModal', this.toggleModal)
37
- // EventBus.$on("toggleAccountSettingsModal", this.toggleModal);
38
- // EventBus.$on("toggleSSOLanguageModal", this.toggleModal);
39
- // EventBus.$on("toggleOTPField", this.toggleModal);
40
- EventBus.$on("toggleSSOModal", this.toggleModal);
41
- EventBus.$on("toggleSSOPickModal", this.toggleModal);
42
- },
43
- methods: {
44
- toggleModal(shouldToggle = true) {
45
- if (shouldToggle) {
46
- this.toggle = !this.toggle;
47
- if (this.toggle) {
48
- window.document.body.style.overflow = "hidden";
49
- window.document.body.style.height = "100vh";
50
- } else {
51
- window.document.body.style.overflow = "auto";
52
- window.document.body.style.height = "auto";
53
- }
54
- }
55
- },
56
- toggleEmit() {
57
- if(!this.isLoggedIn && this.user?.lead_form?.forceFilling) return;
58
- EventBus.$emit("closeModal");
59
- },
60
- },
61
- };
62
- </script>
63
-
64
- <style scoped>
65
- .fade-enter-to /* .fade-leave-active below version 2.1.8 */ {
66
- opacity: 1;
67
- }
68
- </style>
@@ -1,105 +0,0 @@
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="small-bottom" style="margin: 0 auto; margin-top: 2px; margin-bottom: 15px; width: 40px;"
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%; margin: 0 auto; height: 25px;"
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("toggleOTPField", this.toggleModal);
73
- EventBus.$on("closeModal", () => {
74
- this.toggle = false;
75
- });
76
- },
77
- beforeDestroy() {
78
- EventBus["_events"]["toggleOTPField"].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("toggleOTPField")
95
- this.loading = false;
96
- },
97
- toggleModal() {
98
- this.toggle = !this.toggle;
99
- },
100
- },
101
- };
102
- </script>
103
-
104
- <style scoped>
105
- </style>
@@ -1,120 +0,0 @@
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
- <h3 class="bold center-text color-black half-top half-bottom">
22
- {{ ssoLang[appLanguage].enter_company_email }}
23
- </h3>
24
- <div>
25
- <input
26
- type="text"
27
- v-model="email"
28
- :placeholder="ssoLang[this.appLanguage].email"
29
- autocomplete="off"
30
- autocorrect="off"
31
- autocapitalize="off"
32
- spellcheck="false"
33
- class="edit-input h-40 lh-40"
34
- style="width: 80%"
35
- required
36
- @keydown.space.prevent
37
- />
38
- </div>
39
-
40
- <button
41
- type="submit"
42
- class="button black-button white-button button-full"
43
- style="margin: 0 auto; margin-top: 25px; margin-bottom: 30px"
44
- >
45
- <span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
46
- <span v-else class="button--loading button__loader"></span>
47
- </button>
48
- </form>
49
- </template>
50
-
51
- <script>
52
- import { EventBus } from "../store/event-bus";
53
- import MicrosoftMixin from "../mixins/microsoft.mixin";
54
- import OktaMixin from "../mixins/okta.mixin";
55
- import SamlMixin from "../mixins/saml.mixin";
56
- import AuthMixin from "../mixins/auth.mixin";
57
- export default {
58
- name: "SSO",
59
- mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
60
- data() {
61
- return {
62
- toggle: false,
63
- email: "",
64
- loading: false,
65
- };
66
- },
67
- mounted() {
68
- EventBus.$on("toggleSSOModal", this.toggleModal);
69
- EventBus.$on("closeModal", () => {
70
- this.toggle = false;
71
- });
72
- },
73
- beforeDestroy() {
74
- EventBus["_events"]["toggleSSOModal"].pop();
75
- },
76
- methods: {
77
- forceClose() {
78
- EventBus.$emit("closeModal");
79
- },
80
- close() {
81
- this.toggleModal();
82
- },
83
- async submit() {
84
- this.loading = true;
85
- const response = await this.getCompanyBySSOEmail({ email: this.email });
86
- this.loading = false;
87
- let ssoTypes;
88
- if (!response || response.error) return;
89
- else {
90
- ssoTypes = Object.keys(response.sso);
91
- if (!ssoTypes.length) {
92
- this.forceClose();
93
- return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins);
94
- } else {
95
- if (ssoTypes[0] === "azure")
96
- this.microsoftLogin("sso", response.sso.azure.sso);
97
- if (ssoTypes[0] === "okta") this.oktaLogin(response.sso.okta.sso);
98
- if (ssoTypes[0] === "saml")
99
- this.samlLogin(response.sso.saml.sso.loginUrl);
100
- }
101
- }
102
- },
103
- toggleModal() {
104
- this.toggle = !this.toggle;
105
- },
106
- },
107
- };
108
- </script>
109
-
110
- <style scoped>
111
- .sso-img {
112
- margin: 0 auto;
113
- margin-top: 2px;
114
- width: 35px;
115
- }
116
- input {
117
- margin: 0 auto;
118
- height: 25px;
119
- }
120
- </style>