@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.
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-BVGvxZ85.js} +31 -32
  6. package/dist/{QR-2Izy5Dj4.js → QR-DwjajyG2.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-B8fBS6C4.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
@@ -1,105 +1,75 @@
1
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>
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
- <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>
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
- <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>
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 "../store/event-bus.js";
60
- import AuthMixin from "@/mixins/auth.mixin.js";
30
+ import { EventBus } from '../store/event-bus.js';
31
+ import AuthMixin from '@/mixins/auth.mixin.js';
61
32
  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("toggleOTPModal", this.toggleModal);
73
- EventBus.$on("closeModal", () => {
74
- this.toggle = false;
75
- });
76
- },
77
- beforeDestroy() {
78
- EventBus["_events"]["toggleOTPModal"].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
- }
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
- this.loading = true;
93
- EventBus.$emit('otpSubmitted', this.otp);
94
- EventBus.$emit("toggleOTPModal")
95
- this.loading = false;
96
- },
97
- toggleModal() {
98
- this.toggle = !this.toggle;
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>
@@ -1,126 +1,95 @@
1
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>
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
- <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>
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 "../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";
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
- 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 if (ssoTypes.length <= 1) {
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
- } else {
101
- this.forceClose();
102
- EventBus.$emit("toggleSSOPickModal", {
103
- sso: response.sso,
104
- email: this.email,
105
- });
106
- }
107
- }
108
- },
109
- toggleModal() {
110
- this.toggle = !this.toggle;
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
- margin: 0 auto;
119
- margin-top: 2px;
120
- width: 35px;
87
+ margin: 0 auto;
88
+ margin-top: 2px;
89
+ width: 35px;
121
90
  }
122
91
  input {
123
- margin: 0 auto;
124
- height: 25px;
92
+ margin: 0 auto;
93
+ height: 25px;
125
94
  }
126
95
  </style>
@@ -1,166 +1,111 @@
1
1
  <template>
2
- <form
3
- @submit.prevent
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].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
- <!-- Azure Login Button -->
26
- <a
27
- v-if="sso?.azure"
28
- @click="ssoLogin('azure')"
29
- class="button-center button black-button button-90 google-button pointer"
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
- <!-- Okta Login Button -->
47
- <a
48
- v-if="sso?.okta"
49
- @click="ssoLogin('okta')"
50
- class="button-center button black-button button-90 google-button pointer"
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
- <!-- SAML Login Button -->
68
- <a
69
- v-if="sso?.saml"
70
- @click="ssoLogin('saml')"
71
- class="button-center button black-button button-90 google-button pointer"
72
- >
73
- <img
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 "../store/event-bus";
92
- import MicrosoftMixin from "../mixins/microsoft.mixin";
93
- import OktaMixin from "../mixins/okta.mixin";
94
- import SamlMixin from "../mixins/saml.mixin";
95
- import AuthMixin from "../mixins/auth.mixin";
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
- name: "SSOPick",
98
- mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
99
- data() {
100
- return {
101
- toggle: false,
102
- sso: null,
103
- email: null,
104
- azureLoad: false,
105
- oktaLoad: false,
106
- samlLoad: false,
107
- };
108
- },
109
- mounted() {
110
- EventBus.$on("toggleSSOPickModal", this.toggleModal);
111
- EventBus.$on("closeModal", () => {
112
- this.toggle = false;
113
- });
114
- },
115
- beforeDestroy() {
116
- EventBus["_events"]["toggleSSOPickModal"].pop();
117
- },
118
- methods: {
119
- forceClose() {
120
- EventBus.$emit("closeModal");
121
- },
122
- close() {
123
- this.toggleModal();
124
- },
125
- async ssoLogin(type) {
126
- if (type === "azure") {
127
- this.microsoftLogin("sso", this.sso.azure.sso);
128
- this.azureLoad = true;
129
- }
130
- if (type === "okta") {
131
- this.oktaLogin(this.sso.okta.sso);
132
- this.oktaLoad = true;
133
- }
134
- if (type === "saml") {
135
- this.samlLogin(this.sso.saml.sso.loginUrl);
136
- this.samlLoad = true;
137
- }
138
- },
139
- toggleModal(data) {
140
- this.azureLoad = false;
141
- this.oktaLoad = false;
142
- this.samlLoad = false;
143
- this.sso = null;
144
- this.email = null;
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
- if (data) {
147
- this.sso = data.sso;
148
- this.email = data.email;
149
- }
150
- this.toggle = !this.toggle;
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
- margin: 0 auto;
159
- margin-top: 2px;
160
- width: 35px;
103
+ margin: 0 auto;
104
+ margin-top: 2px;
105
+ width: 35px;
161
106
  }
162
107
  input {
163
- margin: 0 auto;
164
- height: 25px;
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
+ ];