@tapni/auth 0.0.169 → 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.
- package/README.md +2 -0
- package/dist/.vite/manifest.json +18 -10
- package/dist/.well-known/assetlinks.json +10 -12
- package/dist/.well-known/microsoft-identity-association.json +5 -5
- package/dist/{Account-ja1hZJy5.js → Account-BB71UmF3.js} +31 -32
- package/dist/{QR-ybXT1KGe.js → QR-BJnR_0ci.js} +3 -3
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +9 -9
- package/dist/blank.html +31 -0
- package/dist/{install-4aK3Wz63.js → install-Cx9Gi17U.js} +753 -997
- package/dist/site.webmanifest +11 -1
- package/dist/style.css +1 -1
- package/dist/{web-NrPZl3qD.js → web-XbruGdlD.js} +2 -5
- package/package.json +64 -55
- package/src/.prettierrc.json +16 -0
- package/src/App.vue +249 -265
- package/src/components/Language.vue +66 -143
- package/src/components/LinkIcon.vue +174 -225
- package/src/components/ModalOverlay.vue +47 -50
- package/src/components/OTP.vue +64 -94
- package/src/components/SSO.vue +80 -111
- package/src/components/SSOPick.vue +93 -148
- package/src/eslint.config.js +15 -0
- package/src/install.js +9 -10
- package/src/main.js +54 -57
- package/src/mixins/apple.mixin.js +56 -54
- package/src/mixins/auth.mixin.js +21 -74
- package/src/mixins/facebook.mixin.js +67 -66
- package/src/mixins/global.mixin.js +107 -109
- package/src/mixins/google.mixin.js +53 -54
- package/src/mixins/mfa-auth.mixin.js +68 -68
- package/src/mixins/microsoft.mixin.js +67 -75
- package/src/mixins/okta.mixin.js +50 -57
- package/src/mixins/qr-auth.mixin.js +111 -107
- package/src/mixins/saml.mixin.js +97 -48
- package/src/router/index.js +6 -6
- package/src/routes.js +60 -66
- package/src/services/Api.js +55 -57
- package/src/services/AuthService.js +75 -75
- package/src/services/CompanyService.js +10 -10
- package/src/services/DeviceService.js +3 -3
- package/src/services/UserService.js +45 -45
- package/src/services/UtilService.js +256 -218
- package/src/store/auth.js +471 -543
- package/src/store/constants.js +1 -1
- package/src/store/event-bus.js +22 -22
- package/src/store/locales/cn.js +442 -458
- package/src/store/locales/de.js +438 -517
- package/src/store/locales/en.js +449 -510
- package/src/store/locales/es.js +442 -524
- package/src/store/locales/fr.js +442 -516
- package/src/store/locales/it.js +442 -514
- package/src/store/locales/kr.js +442 -491
- package/src/store/locales/lang.js +43 -43
- package/src/store/locales/sr.js +439 -492
- package/src/store/locales/tr.js +436 -487
- package/src/store/store.js +6 -6
- package/src/views/Account.vue +169 -207
- package/src/views/Callback.vue +36 -33
- package/src/views/Login.vue +220 -392
- package/src/views/MFA.vue +89 -103
- package/src/views/QR.vue +25 -28
- package/src/views/Register.vue +201 -205
- package/src/views/Reset.vue +132 -135
- package/src/views/Verify.vue +153 -151
- package/src/views/Welcome.vue +61 -60
- /package/dist/{web-L3jORB19.js → web-AXRKjAOB.js} +0 -0
- /package/dist/{web-5VtGcKeU.js → web-IFGkBi0t.js} +0 -0
- /package/dist/{web-AImUTDQQ.js → web-LIfHmYL2.js} +0 -0
package/src/views/MFA.vue
CHANGED
|
@@ -1,116 +1,102 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
69
|
-
import AuthMixin from
|
|
70
|
-
import AuthService from '../services/AuthService'
|
|
71
|
-
import to from
|
|
72
|
-
import {EventBus} from
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
83
|
+
if (!this.mfaEnable) {
|
|
84
|
+
delete data.otpSecret;
|
|
85
|
+
}
|
|
100
86
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
31
|
-
import AuthMixin from
|
|
27
|
+
import QRAuthMixin from '../mixins/qr-auth.mixin';
|
|
28
|
+
import AuthMixin from '../mixins/auth.mixin';
|
|
32
29
|
|
|
33
30
|
export default {
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
name: 'AuthQR',
|
|
32
|
+
mixins: [AuthMixin, QRAuthMixin]
|
|
36
33
|
};
|
|
37
34
|
</script>
|
|
38
35
|
|