@tapni/auth 0.0.170 → 0.0.171

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 (69) hide show
  1. package/README.md +2 -0
  2. package/dist/.vite/manifest.json +18 -10
  3. package/dist/.well-known/assetlinks.json +10 -12
  4. package/dist/.well-known/microsoft-identity-association.json +5 -5
  5. package/dist/{Account-6F9eRo1R.js → Account-BB71UmF3.js} +31 -32
  6. package/dist/{QR-2Izy5Dj4.js → QR-BJnR_0ci.js} +3 -3
  7. package/dist/TapniAuth.es.js +1 -1
  8. package/dist/TapniAuth.umd.js +9 -9
  9. package/dist/blank.html +31 -0
  10. package/dist/{install-co2F1hxN.js → install-Cx9Gi17U.js} +752 -996
  11. package/dist/site.webmanifest +11 -1
  12. package/dist/style.css +1 -1
  13. package/dist/{web-NrPZl3qD.js → web-XbruGdlD.js} +2 -5
  14. package/package.json +64 -55
  15. package/src/.prettierrc.json +16 -0
  16. package/src/App.vue +249 -265
  17. package/src/components/Language.vue +66 -143
  18. package/src/components/LinkIcon.vue +174 -225
  19. package/src/components/ModalOverlay.vue +47 -50
  20. package/src/components/OTP.vue +64 -94
  21. package/src/components/SSO.vue +80 -111
  22. package/src/components/SSOPick.vue +93 -148
  23. package/src/eslint.config.js +15 -0
  24. package/src/install.js +9 -10
  25. package/src/main.js +54 -57
  26. package/src/mixins/apple.mixin.js +56 -54
  27. package/src/mixins/auth.mixin.js +21 -74
  28. package/src/mixins/facebook.mixin.js +67 -66
  29. package/src/mixins/global.mixin.js +107 -109
  30. package/src/mixins/google.mixin.js +53 -54
  31. package/src/mixins/mfa-auth.mixin.js +68 -68
  32. package/src/mixins/microsoft.mixin.js +67 -75
  33. package/src/mixins/okta.mixin.js +50 -57
  34. package/src/mixins/qr-auth.mixin.js +111 -107
  35. package/src/mixins/saml.mixin.js +97 -48
  36. package/src/router/index.js +6 -6
  37. package/src/routes.js +60 -66
  38. package/src/services/Api.js +55 -57
  39. package/src/services/AuthService.js +75 -75
  40. package/src/services/CompanyService.js +10 -10
  41. package/src/services/DeviceService.js +3 -3
  42. package/src/services/UserService.js +45 -45
  43. package/src/services/UtilService.js +256 -218
  44. package/src/store/auth.js +471 -543
  45. package/src/store/constants.js +1 -1
  46. package/src/store/event-bus.js +22 -22
  47. package/src/store/locales/cn.js +442 -458
  48. package/src/store/locales/de.js +438 -517
  49. package/src/store/locales/en.js +449 -510
  50. package/src/store/locales/es.js +442 -524
  51. package/src/store/locales/fr.js +442 -516
  52. package/src/store/locales/it.js +442 -514
  53. package/src/store/locales/kr.js +442 -491
  54. package/src/store/locales/lang.js +43 -43
  55. package/src/store/locales/sr.js +439 -492
  56. package/src/store/locales/tr.js +436 -487
  57. package/src/store/store.js +6 -6
  58. package/src/views/Account.vue +169 -207
  59. package/src/views/Callback.vue +36 -33
  60. package/src/views/Login.vue +220 -392
  61. package/src/views/MFA.vue +89 -103
  62. package/src/views/QR.vue +25 -28
  63. package/src/views/Register.vue +201 -205
  64. package/src/views/Reset.vue +132 -135
  65. package/src/views/Verify.vue +153 -151
  66. package/src/views/Welcome.vue +61 -60
  67. /package/dist/{web-L3jORB19.js → web-AXRKjAOB.js} +0 -0
  68. /package/dist/{web-5VtGcKeU.js → web-IFGkBi0t.js} +0 -0
  69. /package/dist/{web-AImUTDQQ.js → web-LIfHmYL2.js} +0 -0
package/src/views/MFA.vue CHANGED
@@ -1,116 +1,102 @@
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
- <h4 style="text-align: center; width: 80%; margin: 0 auto; margin-top: 50px;">
9
- 2-Step Verification
10
- </h4>
11
- <br>
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
+ <h4 style="text-align: center; width: 80%; margin: 0 auto; margin-top: 50px">2-Step Verification</h4>
9
+ <br />
12
10
 
13
- <div class="qrCodeLoginContainer center-text">
11
+ <div class="qrCodeLoginContainer center-text">
12
+ <div>
13
+ Enable Multi-Factor Authentication
14
+ <div class="ios-switch" style="display: inline-block; float: right">
15
+ <input v-model="mfaEnable" type="checkbox" name="ios-switch" class="ios-switch-checkbox" :id="'mfa-open-switch'" />
16
+ <label class="ios-switch-label" :for="'mfa-open-switch'"></label>
17
+ </div>
18
+ </div>
19
+ <br />
20
+ <div v-show="mfaEnable && !account.mfaEnabled" style="text-align: center">
21
+ <div id="qrCodeContainer" class="qrCodeRounded" style="max-width: 100%" />
22
+ <br />
23
+ <p class="bold pointer font-16 underline" @click="copy(otpSecret)">{{ otpSecret }}</p>
24
+ <br />
25
+ <br />
26
+ <div style="margin: 0 auto; width: 85%; text-align: center">
27
+ <h5 class="">Scan the QR code above or enter the secret key into your authenticator app.</h5>
28
+ <br />
29
+ </div>
30
+ </div>
31
+ <form @submit.prevent="validateMFA" v-if="account.mfaEnabled !== mfaEnable">
32
+ <button type="submit" class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer">
33
+ <span v-if="!loading">{{ ssoLang[appLanguage].continue }}</span>
34
+ <span v-else class="button--loading button__loader"></span>
35
+ </button>
36
+ <a href="javascript:;" @click="cancelMFA">Cancel</a>
37
+ </form>
38
+ <div v-else style="margin: 0 auto; width: 100%; text-align: center">
39
+ <div>
40
+ <h5 v-if="mfaEnable" class="">
41
+ Your account is protected via <br />
42
+ multi-factor authentication (MFA) ✅
43
+ </h5>
44
+ <h5 v-else class="">Protect your account from unauthorized access by enabling multi-factor authentication (MFA)</h5>
14
45
 
15
- <div>
16
- Enable Multi-Factor Authentication
17
- <div class="ios-switch" style="display: inline-block;float: right">
18
- <input
19
- v-model="mfaEnable"
20
- type="checkbox"
21
- name="ios-switch"
22
- class="ios-switch-checkbox"
23
- :id="'mfa-open-switch'"
24
- />
25
- <label class="ios-switch-label" :for="'mfa-open-switch'"></label>
26
- </div>
27
- </div>
28
- <br>
29
- <div v-show="mfaEnable && !account.mfaEnabled" style="text-align: center;">
30
- <div id="qrCodeContainer"
31
- class="qrCodeRounded"
32
- style="max-width: 100%;"/>
33
- <br>
34
- <p class="bold pointer font-16 underline" @click="copy(otpSecret)"> {{ otpSecret }}</p>
35
- <br>
36
- <br>
37
- <div style="margin: 0 auto; width: 85%; text-align: center;">
38
- <h5 class="">Scan the QR code above or enter the secret key into your authenticator app.</h5>
39
- <br>
40
- </div>
41
- </div>
42
- <form @submit.prevent="validateMFA" v-if="account.mfaEnabled !== mfaEnable">
43
- <button
44
- type="submit"
45
- class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"
46
- >
47
- <span v-if="!loading">{{ ssoLang[appLanguage].continue }}</span>
48
- <span v-else class="button--loading button__loader"></span>
49
- </button>
50
- <a href="javascript:;" @click="cancelMFA">Cancel</a>
51
- </form>
52
- <div v-else style="margin: 0 auto; width: 100%; text-align: center;">
53
- <div>
54
- <h5 v-if="mfaEnable" class="">
55
- Your account is protected via <br> multi-factor authentication (MFA) ✅
56
- </h5>
57
- <h5 v-else class="">Protect your account from unauthorized access by enabling multi-factor authentication (MFA)</h5>
58
-
59
- <a class="half-top" href="javascript:;" @click="cancelMFA">Go Back to Account Settings</a>
60
- </div>
61
- </div>
62
- </div>
63
- </div>
46
+ <a class="half-top" href="javascript:;" @click="cancelMFA">Go Back to Account Settings</a>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
64
51
  </template>
65
52
 
66
-
67
53
  <script>
68
- import MFAAuthMixin from "../mixins/mfa-auth.mixin";
69
- import AuthMixin from "../mixins/auth.mixin";
70
- import AuthService from '../services/AuthService'
71
- import to from "await-to-js";
72
- import {EventBus} from "@/store/event-bus.js";
54
+ import MFAAuthMixin from '../mixins/mfa-auth.mixin';
55
+ import AuthMixin from '../mixins/auth.mixin';
56
+ import AuthService from '../services/AuthService';
57
+ import to from 'await-to-js';
58
+ import { EventBus } from '@/store/event-bus.js';
73
59
 
74
60
  export default {
75
- name: "AuthMFA",
76
- mixins: [AuthMixin, MFAAuthMixin],
77
- props: {
78
- payload: {
79
- type: Object,
80
- default: {}
81
- },
82
- },
83
- mounted() {
84
- if (!this.isLoggedIn) this.$router.push('/login');
85
- },
86
- methods: {
87
- close () {
88
- EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
89
- },
90
- async submit() {
91
- let data = {
92
- otpToken: this.otpToken,
93
- otpSecret: this.otpSecret,
94
- enable: this.mfaEnable,
95
- };
61
+ name: 'AuthMFA',
62
+ mixins: [AuthMixin, MFAAuthMixin],
63
+ props: {
64
+ payload: {
65
+ type: Object,
66
+ default: {}
67
+ }
68
+ },
69
+ mounted() {
70
+ if (!this.isLoggedIn) this.$router.push('/login');
71
+ },
72
+ methods: {
73
+ close() {
74
+ EventBus.$emit('ssoEvent', { name: 'toggleAuthModal', data: true });
75
+ },
76
+ async submit() {
77
+ let data = {
78
+ otpToken: this.otpToken,
79
+ otpSecret: this.otpSecret,
80
+ enable: this.mfaEnable
81
+ };
96
82
 
97
- if (!this.mfaEnable) {
98
- delete data.otpSecret;
99
- }
83
+ if (!this.mfaEnable) {
84
+ delete data.otpSecret;
85
+ }
100
86
 
101
- this.loading = true;
102
- const [err, response] = await to(AuthService.setMfa(data, this.$storex))
103
- this.loading = false;
104
- if (err) {
105
- EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
106
- return this.errorHandler(err)
107
- }
108
- if (response.data.success) {
109
- this.getAccountSettings();
110
- this.successSnack(response.data.message);
111
- }
112
- },
113
- }
87
+ this.loading = true;
88
+ const [err, response] = await to(AuthService.setMfa(data, this.$storex));
89
+ this.loading = false;
90
+ if (err) {
91
+ EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
92
+ return this.errorHandler(err);
93
+ }
94
+ if (response.data.success) {
95
+ this.getAccountSettings();
96
+ this.successSnack(response.data.message);
97
+ }
98
+ }
99
+ }
114
100
  };
115
101
  </script>
116
102
 
package/src/views/QR.vue CHANGED
@@ -1,38 +1,35 @@
1
1
  <template>
2
- <div class="page-login content-boxed content-boxed-padding">
3
- <h5 style="text-align: center; width: 80%; margin: 0 auto; margin-top: 130px;">
4
- {{ ssoLang[appLanguage].use_tapni_on_the_web }}
5
- </h5>
6
- <br>
2
+ <div class="page-login content-boxed content-boxed-padding">
3
+ <h5 style="text-align: center; width: 80%; margin: 0 auto; margin-top: 130px">
4
+ {{ ssoLang[appLanguage].use_tapni_on_the_web }}
5
+ </h5>
6
+ <br />
7
7
 
8
- <div class="qrCodeLoginContainer center-text">
9
- <div id="qrCodeContainer"
10
- class="qrCodeRounded"
11
- style="max-width: 100%;"/>
12
- <br>
13
- <br>
14
- <div style="margin: 0 auto; width: 85%; text-align: left;">
15
- <h2 class="center-text">{{ ssoLang[appLanguage].login_by_scanning_qr_code }}</h2>
16
- <br>
17
- <h4>{{ ssoLang[appLanguage].open_tapni_app_on_your_phone }}</h4>
18
- <h4>{{ ssoLang[appLanguage].go_to_settings_link_a_device }}</h4>
19
- <h4>{{ ssoLang[appLanguage].point_your_phone_at_this_qr_code }}</h4>
20
- <br>
21
- <br>
22
- </div>
23
- <router-link to="/login">{{ ssoLang[appLanguage].choose_other_login_methods }}</router-link>
24
- </div>
25
- </div>
8
+ <div class="qrCodeLoginContainer center-text">
9
+ <div id="qrCodeContainer" class="qrCodeRounded" style="max-width: 100%" />
10
+ <br />
11
+ <br />
12
+ <div style="margin: 0 auto; width: 85%; text-align: left">
13
+ <h2 class="center-text">{{ ssoLang[appLanguage].login_by_scanning_qr_code }}</h2>
14
+ <br />
15
+ <h4>{{ ssoLang[appLanguage].open_tapni_app_on_your_phone }}</h4>
16
+ <h4>{{ ssoLang[appLanguage].go_to_settings_link_a_device }}</h4>
17
+ <h4>{{ ssoLang[appLanguage].point_your_phone_at_this_qr_code }}</h4>
18
+ <br />
19
+ <br />
20
+ </div>
21
+ <router-link to="/login">{{ ssoLang[appLanguage].choose_other_login_methods }}</router-link>
22
+ </div>
23
+ </div>
26
24
  </template>
27
25
 
28
-
29
26
  <script>
30
- import QRAuthMixin from "../mixins/qr-auth.mixin";
31
- import AuthMixin from "../mixins/auth.mixin";
27
+ import QRAuthMixin from '../mixins/qr-auth.mixin';
28
+ import AuthMixin from '../mixins/auth.mixin';
32
29
 
33
30
  export default {
34
- name: "AuthQR",
35
- mixins: [AuthMixin, QRAuthMixin],
31
+ name: 'AuthQR',
32
+ mixins: [AuthMixin, QRAuthMixin]
36
33
  };
37
34
  </script>
38
35