@tapni/auth 0.0.170 → 0.0.172
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-6F9eRo1R.js → Account-BVGvxZ85.js} +31 -32
- package/dist/{QR-2Izy5Dj4.js → QR-DwjajyG2.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-co2F1hxN.js → install-B8fBS6C4.js} +752 -996
- 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/components/OTP.vue
CHANGED
|
@@ -1,105 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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>
|
|
2
|
+
<form @submit.prevent="submit" class="menu-wrapper menu-light menu-modal center-text activate-page" :class="{ 'active-menu': toggle }" style="height: auto; margin-top: -172.5px">
|
|
3
|
+
<a @click="forceClose" class="color-black pull-right pointer" style="margin-top: 5px; position: absolute; right: 5px">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 45%" />
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<img :src="'https://cdn.tapni.co/icons/padlock.png'" class="small-bottom" style="margin: 0 auto; margin-top: 2px; margin-bottom: 15px; width: 40px" />
|
|
9
|
+
<h3 class="bold center-text color-black half-top half-bottom">
|
|
10
|
+
{{ ssoLang[appLanguage].otp_title }}
|
|
11
|
+
</h3>
|
|
12
|
+
<p class="half-top full-bottom padding-left padding-right" v-html="ssoLang[appLanguage].otp_subtitle"></p>
|
|
13
|
+
<div>
|
|
14
|
+
<input type="text" v-model="otp" :placeholder="ssoLang[appLanguage].otp_code" class="edit-input h-40 lh-40" style="width: 80%; margin: 0 auto; height: 25px" required @keydown.space.prevent />
|
|
15
|
+
</div>
|
|
40
16
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
<span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
|
|
47
|
-
<span v-else class="button--loading button__loader"></span>
|
|
48
|
-
</button>
|
|
17
|
+
<button type="submit" class="button black-button white-button button-full" style="margin: 0 auto; margin-top: 25px; margin-bottom: 30px">
|
|
18
|
+
<span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
|
|
19
|
+
<span v-else class="button--loading button__loader"></span>
|
|
20
|
+
</button>
|
|
49
21
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</form>
|
|
22
|
+
<p class="close-text center-text half-top color-black">
|
|
23
|
+
<span v-html="ssoLang[this.appLanguage].otp_p1"></span>
|
|
24
|
+
<a href="mailto:support@tapni.com?subject=MFA Authentication Problem"> support@tapni.com</a>
|
|
25
|
+
</p>
|
|
26
|
+
</form>
|
|
56
27
|
</template>
|
|
57
28
|
|
|
58
29
|
<script>
|
|
59
|
-
import { EventBus } from
|
|
60
|
-
import AuthMixin from
|
|
30
|
+
import { EventBus } from '../store/event-bus.js';
|
|
31
|
+
import AuthMixin from '@/mixins/auth.mixin.js';
|
|
61
32
|
export default {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
33
|
+
name: 'OTP',
|
|
34
|
+
mixins: [AuthMixin],
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
toggle: false,
|
|
38
|
+
otp: '',
|
|
39
|
+
loading: false
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
mounted() {
|
|
43
|
+
EventBus.$on('toggleOTPModal', this.toggleModal);
|
|
44
|
+
EventBus.$on('closeModal', () => {
|
|
45
|
+
this.toggle = false;
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
beforeDestroy() {
|
|
49
|
+
EventBus['_events']['toggleOTPModal'].pop();
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
forceClose() {
|
|
53
|
+
EventBus.$emit('closeModal');
|
|
54
|
+
},
|
|
55
|
+
close() {
|
|
56
|
+
this.toggleModal();
|
|
57
|
+
},
|
|
58
|
+
async submit() {
|
|
59
|
+
if (!this.otp || this.otp.length !== 6) {
|
|
60
|
+
return this.errorSnack(this.ssoLang[this.appLanguage].invalid_code);
|
|
61
|
+
}
|
|
91
62
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
63
|
+
this.loading = true;
|
|
64
|
+
EventBus.$emit('otpSubmitted', this.otp);
|
|
65
|
+
EventBus.$emit('toggleOTPModal');
|
|
66
|
+
this.loading = false;
|
|
67
|
+
},
|
|
68
|
+
toggleModal() {
|
|
69
|
+
this.toggle = !this.toggle;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
101
72
|
};
|
|
102
73
|
</script>
|
|
103
74
|
|
|
104
|
-
<style scoped>
|
|
105
|
-
</style>
|
|
75
|
+
<style scoped></style>
|
package/src/components/SSO.vue
CHANGED
|
@@ -1,126 +1,95 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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>
|
|
2
|
+
<form @submit.prevent="submit" class="menu-wrapper menu-light menu-modal center-text activate-page" :class="{ 'active-menu': toggle }" style="height: auto; margin-top: -172.5px">
|
|
3
|
+
<a @click="forceClose" class="color-black pull-right pointer" style="margin-top: 5px; position: absolute; right: 5px">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 45%" />
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<h3 class="bold center-text color-black half-top half-bottom">
|
|
9
|
+
{{ ssoLang[appLanguage].enter_company_email }}
|
|
10
|
+
</h3>
|
|
11
|
+
<div>
|
|
12
|
+
<input type="text" v-model="email" :placeholder="ssoLang[this.appLanguage].email" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="edit-input h-40 lh-40" style="width: 80%" required @keydown.space.prevent />
|
|
13
|
+
</div>
|
|
39
14
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
|
|
46
|
-
<span v-else class="button--loading button__loader"></span>
|
|
47
|
-
</button>
|
|
48
|
-
</form>
|
|
15
|
+
<button type="submit" class="button black-button white-button button-full" style="margin: 0 auto; margin-top: 25px; margin-bottom: 30px">
|
|
16
|
+
<span v-if="!loading">{{ ssoLang[appLanguage].continue }} </span>
|
|
17
|
+
<span v-else class="button--loading button__loader"></span>
|
|
18
|
+
</button>
|
|
19
|
+
</form>
|
|
49
20
|
</template>
|
|
50
21
|
|
|
51
22
|
<script>
|
|
52
|
-
import { EventBus } from
|
|
53
|
-
import MicrosoftMixin from
|
|
54
|
-
import OktaMixin from
|
|
55
|
-
import SamlMixin from
|
|
56
|
-
import AuthMixin from
|
|
23
|
+
import { EventBus } from '../store/event-bus';
|
|
24
|
+
import MicrosoftMixin from '../mixins/microsoft.mixin';
|
|
25
|
+
import OktaMixin from '../mixins/okta.mixin';
|
|
26
|
+
import SamlMixin from '../mixins/saml.mixin';
|
|
27
|
+
import AuthMixin from '../mixins/auth.mixin';
|
|
57
28
|
export default {
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
},
|
|
29
|
+
name: 'SSO',
|
|
30
|
+
mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
toggle: false,
|
|
34
|
+
email: '',
|
|
35
|
+
loading: false
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
mounted() {
|
|
39
|
+
EventBus.$on('toggleSSOModal', this.toggleModal);
|
|
40
|
+
EventBus.$on('closeModal', () => {
|
|
41
|
+
this.toggle = false;
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
beforeDestroy() {
|
|
45
|
+
EventBus['_events']['toggleSSOModal'].pop();
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
forceClose() {
|
|
49
|
+
EventBus.$emit('closeModal');
|
|
50
|
+
},
|
|
51
|
+
close() {
|
|
52
|
+
this.toggleModal();
|
|
53
|
+
},
|
|
54
|
+
async submit() {
|
|
55
|
+
this.loading = true;
|
|
56
|
+
const response = await this.getCompanyBySSOEmail({ email: this.email });
|
|
57
|
+
this.loading = false;
|
|
58
|
+
let ssoTypes;
|
|
59
|
+
if (!response || response.error) return;
|
|
60
|
+
else {
|
|
61
|
+
ssoTypes = Object.keys(response.sso);
|
|
62
|
+
if (!ssoTypes.length) {
|
|
63
|
+
this.forceClose();
|
|
64
|
+
return this.errorSnack(this.ssoLang[this.appLanguage].no_sso_logins);
|
|
65
|
+
} else if (ssoTypes.length <= 1) {
|
|
66
|
+
if (ssoTypes[0] === 'azure') this.microsoftLogin('sso', response.sso.azure.sso);
|
|
67
|
+
if (ssoTypes[0] === 'okta') this.oktaLogin(response.sso.okta.sso);
|
|
68
|
+
if (ssoTypes[0] === 'saml') this.samlLogin(response.sso.saml.sso.loginUrl);
|
|
69
|
+
} else {
|
|
70
|
+
this.forceClose();
|
|
71
|
+
EventBus.$emit('toggleSSOPickModal', {
|
|
72
|
+
sso: response.sso,
|
|
73
|
+
email: this.email
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
toggleModal() {
|
|
79
|
+
this.toggle = !this.toggle;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
113
82
|
};
|
|
114
83
|
</script>
|
|
115
84
|
|
|
116
85
|
<style scoped>
|
|
117
86
|
.sso-img {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
87
|
+
margin: 0 auto;
|
|
88
|
+
margin-top: 2px;
|
|
89
|
+
width: 35px;
|
|
121
90
|
}
|
|
122
91
|
input {
|
|
123
|
-
|
|
124
|
-
|
|
92
|
+
margin: 0 auto;
|
|
93
|
+
height: 25px;
|
|
125
94
|
}
|
|
126
95
|
</style>
|
|
@@ -1,166 +1,111 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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].select_sign_method }}
|
|
23
|
-
</h3>
|
|
2
|
+
<form @submit.prevent class="menu-wrapper menu-light menu-modal center-text activate-page" :class="{ 'active-menu': toggle }" style="height: auto; margin-top: -172.5px">
|
|
3
|
+
<a @click="forceClose" class="color-black pull-right pointer" style="margin-top: 5px; position: absolute; right: 5px">
|
|
4
|
+
<i class="font-17 color-black">
|
|
5
|
+
<img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 45%" />
|
|
6
|
+
</i>
|
|
7
|
+
</a>
|
|
8
|
+
<h3 class="bold center-text color-black half-top half-bottom">
|
|
9
|
+
{{ ssoLang[appLanguage].select_sign_method }}
|
|
10
|
+
</h3>
|
|
24
11
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<img
|
|
32
|
-
src="https://cdn.tapni.co/icons/azure.png"
|
|
33
|
-
style="
|
|
34
|
-
position: absolute;
|
|
35
|
-
margin-left: -11px;
|
|
36
|
-
padding: 8px 0;
|
|
37
|
-
height: 100%;
|
|
38
|
-
"
|
|
39
|
-
/>
|
|
40
|
-
<span v-if="!azureLoad"
|
|
41
|
-
>{{ ssoLang[appLanguage].sign_in_with }} Azure</span
|
|
42
|
-
>
|
|
43
|
-
<span v-else class="button--loading button__loader"></span>
|
|
44
|
-
</a>
|
|
12
|
+
<!-- Azure Login Button -->
|
|
13
|
+
<a v-if="sso?.azure" @click="ssoLogin('azure')" class="button-center button black-button button-90 google-button pointer">
|
|
14
|
+
<img src="https://cdn.tapni.co/icons/azure.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
|
|
15
|
+
<span v-if="!azureLoad">{{ ssoLang[appLanguage].sign_in_with }} Azure</span>
|
|
16
|
+
<span v-else class="button--loading button__loader"></span>
|
|
17
|
+
</a>
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<img
|
|
53
|
-
src="https://cdn.tapni.co/icons/okta.png"
|
|
54
|
-
style="
|
|
55
|
-
position: absolute;
|
|
56
|
-
margin-left: -11px;
|
|
57
|
-
padding: 8px 0;
|
|
58
|
-
height: 100%;
|
|
59
|
-
"
|
|
60
|
-
/>
|
|
61
|
-
<span v-if="!oktaLoad"
|
|
62
|
-
>{{ ssoLang[appLanguage].sign_in_with }} Okta</span
|
|
63
|
-
>
|
|
64
|
-
<span v-else class="button--loading button__loader"></span>
|
|
65
|
-
</a>
|
|
19
|
+
<!-- Okta Login Button -->
|
|
20
|
+
<a v-if="sso?.okta" @click="ssoLogin('okta')" class="button-center button black-button button-90 google-button pointer">
|
|
21
|
+
<img src="https://cdn.tapni.co/icons/okta.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
|
|
22
|
+
<span v-if="!oktaLoad">{{ ssoLang[appLanguage].sign_in_with }} Okta</span>
|
|
23
|
+
<span v-else class="button--loading button__loader"></span>
|
|
24
|
+
</a>
|
|
66
25
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
src="https://cdn.tapni.co/icons/saml.png"
|
|
75
|
-
style="
|
|
76
|
-
position: absolute;
|
|
77
|
-
margin-left: -11px;
|
|
78
|
-
padding: 8px 0;
|
|
79
|
-
height: 100%;
|
|
80
|
-
"
|
|
81
|
-
/>
|
|
82
|
-
<span v-if="!samlLoad"
|
|
83
|
-
>{{ ssoLang[appLanguage].sign_in_with }} SAML</span
|
|
84
|
-
>
|
|
85
|
-
<span v-else class="button--loading button__loader"></span>
|
|
86
|
-
</a>
|
|
87
|
-
</form>
|
|
26
|
+
<!-- SAML Login Button -->
|
|
27
|
+
<a v-if="sso?.saml" @click="ssoLogin('saml')" class="button-center button black-button button-90 google-button pointer">
|
|
28
|
+
<img src="https://cdn.tapni.co/icons/saml.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
|
|
29
|
+
<span v-if="!samlLoad">{{ ssoLang[appLanguage].sign_in_with }} SAML</span>
|
|
30
|
+
<span v-else class="button--loading button__loader"></span>
|
|
31
|
+
</a>
|
|
32
|
+
</form>
|
|
88
33
|
</template>
|
|
89
34
|
|
|
90
35
|
<script>
|
|
91
|
-
import { EventBus } from
|
|
92
|
-
import MicrosoftMixin from
|
|
93
|
-
import OktaMixin from
|
|
94
|
-
import SamlMixin from
|
|
95
|
-
import AuthMixin from
|
|
36
|
+
import { EventBus } from '../store/event-bus';
|
|
37
|
+
import MicrosoftMixin from '../mixins/microsoft.mixin';
|
|
38
|
+
import OktaMixin from '../mixins/okta.mixin';
|
|
39
|
+
import SamlMixin from '../mixins/saml.mixin';
|
|
40
|
+
import AuthMixin from '../mixins/auth.mixin';
|
|
96
41
|
export default {
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
42
|
+
name: 'SSOPick',
|
|
43
|
+
mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
toggle: false,
|
|
47
|
+
sso: null,
|
|
48
|
+
email: null,
|
|
49
|
+
azureLoad: false,
|
|
50
|
+
oktaLoad: false,
|
|
51
|
+
samlLoad: false
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
mounted() {
|
|
55
|
+
EventBus.$on('toggleSSOPickModal', this.toggleModal);
|
|
56
|
+
EventBus.$on('closeModal', () => {
|
|
57
|
+
this.toggle = false;
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
beforeDestroy() {
|
|
61
|
+
EventBus['_events']['toggleSSOPickModal'].pop();
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
forceClose() {
|
|
65
|
+
EventBus.$emit('closeModal');
|
|
66
|
+
},
|
|
67
|
+
close() {
|
|
68
|
+
this.toggleModal();
|
|
69
|
+
},
|
|
70
|
+
async ssoLogin(type) {
|
|
71
|
+
if (type === 'azure') {
|
|
72
|
+
this.microsoftLogin('sso', this.sso.azure.sso);
|
|
73
|
+
this.azureLoad = true;
|
|
74
|
+
}
|
|
75
|
+
if (type === 'okta') {
|
|
76
|
+
this.oktaLogin(this.sso.okta.sso);
|
|
77
|
+
this.oktaLoad = true;
|
|
78
|
+
}
|
|
79
|
+
if (type === 'saml') {
|
|
80
|
+
this.samlLogin(this.sso.saml.sso.loginUrl);
|
|
81
|
+
this.samlLoad = true;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
toggleModal(data) {
|
|
85
|
+
this.azureLoad = false;
|
|
86
|
+
this.oktaLoad = false;
|
|
87
|
+
this.samlLoad = false;
|
|
88
|
+
this.sso = null;
|
|
89
|
+
this.email = null;
|
|
145
90
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
91
|
+
if (data) {
|
|
92
|
+
this.sso = data.sso;
|
|
93
|
+
this.email = data.email;
|
|
94
|
+
}
|
|
95
|
+
this.toggle = !this.toggle;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
153
98
|
};
|
|
154
99
|
</script>
|
|
155
100
|
|
|
156
101
|
<style scoped>
|
|
157
102
|
.sso-img {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
103
|
+
margin: 0 auto;
|
|
104
|
+
margin-top: 2px;
|
|
105
|
+
width: 35px;
|
|
161
106
|
}
|
|
162
107
|
input {
|
|
163
|
-
|
|
164
|
-
|
|
108
|
+
margin: 0 auto;
|
|
109
|
+
height: 25px;
|
|
165
110
|
}
|
|
166
111
|
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pluginVue from 'eslint-plugin-vue';
|
|
2
|
+
export default [
|
|
3
|
+
...pluginVue.configs['flat/recommended'],
|
|
4
|
+
{
|
|
5
|
+
rules: {
|
|
6
|
+
'vue/require-valid-default-prop': 'off',
|
|
7
|
+
'vue/max-attributes-per-line': 'off',
|
|
8
|
+
'vue/html-indent': 'off',
|
|
9
|
+
'vue/html-self-closing': 'off',
|
|
10
|
+
'vue/singleline-html-element-content-newline': 'off'
|
|
11
|
+
// override/add rules settings here, such as:
|
|
12
|
+
// 'vue/no-unused-vars': 'error'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
];
|