@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.
- package/README.md +2 -0
- package/dist/.vite/manifest.json +16 -43
- package/dist/.well-known/assetlinks.json +10 -12
- package/dist/.well-known/microsoft-identity-association.json +5 -5
- package/dist/{Apps-DMds3Dv-.js → Apps-DRhdYq0_.js} +34 -34
- package/dist/Billing-DkXdzGvS.js +256 -0
- package/dist/CustomApp-Dw80xmqU.js +83 -0
- package/dist/QR-ByY4IUiV.js +41 -0
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +49 -23
- package/dist/{install-L-cxSovH.js → install-Cb6nCJn_.js} +6265 -4741
- package/dist/site.webmanifest +11 -1
- package/dist/style.css +1 -1
- package/dist/{web-IFGkBi0t.js → web-UrTMimK1.js} +2 -2
- package/package.json +66 -55
- package/src/.prettierrc.json +16 -0
- package/src/App.vue +326 -269
- package/src/eslint.config.js +15 -0
- package/src/index.js +4 -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 +3 -2
- package/src/mixins/global.mixin.js +3 -3
- package/src/mixins/google.mixin.js +53 -54
- package/src/mixins/microsoft.mixin.js +2 -5
- package/src/mixins/okta.mixin.js +1 -1
- package/src/mixins/qr-auth.mixin.js +111 -107
- package/src/mixins/saml.mixin.js +82 -45
- package/src/router/index.js +6 -6
- package/src/routes.js +1 -1
- package/src/services/Api.js +56 -58
- package/src/services/AuthService.js +7 -9
- package/src/services/CompanyService.js +10 -10
- package/src/services/DeviceService.js +3 -3
- package/src/services/UserService.js +48 -45
- package/src/services/UtilService.js +317 -225
- package/src/store/auth.js +485 -549
- package/src/store/constants.js +2 -2
- package/src/store/event-bus.js +22 -22
- package/src/store/locales/cn.js +476 -458
- package/src/store/locales/de.js +478 -517
- package/src/store/locales/en.js +454 -513
- package/src/store/locales/es.js +477 -524
- package/src/store/locales/fr.js +477 -516
- package/src/store/locales/it.js +477 -514
- package/src/store/locales/ja.js +488 -0
- package/src/store/locales/kr.js +477 -491
- package/src/store/locales/lang.js +51 -43
- package/src/store/locales/pt.js +488 -0
- package/src/store/locales/sr.js +477 -492
- package/src/store/locales/tr.js +477 -487
- package/src/store/store.js +6 -6
- package/src/views/Account.vue +36 -8
- package/src/views/Billing.vue +464 -34
- package/src/views/Callback.vue +36 -33
- package/src/views/General.vue +151 -185
- package/src/views/Login.vue +2 -25
- package/src/views/Register.vue +2 -12
- package/src/views/Reset.vue +132 -135
- package/src/views/Security.vue +13 -7
- package/src/views/Verify.vue +153 -151
- package/src/views/Welcome.vue +85 -71
- package/dist/Account-Cuz87g_8.js +0 -153
- package/dist/Billing-BXlQEuNy.js +0 -113
- package/dist/CustomApp-CLCMXmMO.js +0 -83
- package/dist/General-dW73bMoR.js +0 -479
- package/dist/QR-D6ZGcPM0.js +0 -41
- package/dist/index.css +0 -193
- package/dist/web-AXRKjAOB.js +0 -92
- package/src/components/DELETE_Language.vue +0 -168
- package/src/components/DELETE_LinkIcon.vue +0 -288
- package/src/components/DELETE_ModalOverlay.vue +0 -68
- package/src/components/DELETE_OTP.vue +0 -105
- package/src/components/DELETE_SSO.vue +0 -120
- package/src/components/DELETE_SSOPick.vue +0 -166
- package/src/mixins/DELETE_mfa-auth.mixin.js +0 -53
- package/src/mixins/facebook.mixin.js +0 -78
|
@@ -1,166 +0,0 @@
|
|
|
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>
|
|
24
|
-
|
|
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>
|
|
45
|
-
|
|
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>
|
|
66
|
-
|
|
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>
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<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";
|
|
96
|
-
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;
|
|
145
|
-
|
|
146
|
-
if (data) {
|
|
147
|
-
this.sso = data.sso;
|
|
148
|
-
this.email = data.email;
|
|
149
|
-
}
|
|
150
|
-
this.toggle = !this.toggle;
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
</script>
|
|
155
|
-
|
|
156
|
-
<style scoped>
|
|
157
|
-
.sso-img {
|
|
158
|
-
margin: 0 auto;
|
|
159
|
-
margin-top: 2px;
|
|
160
|
-
width: 35px;
|
|
161
|
-
}
|
|
162
|
-
input {
|
|
163
|
-
margin: 0 auto;
|
|
164
|
-
height: 25px;
|
|
165
|
-
}
|
|
166
|
-
</style>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import QRCodeStyling from "qr-code-styling";
|
|
2
|
-
import { authenticator } from "@otplib/preset-browser";
|
|
3
|
-
import {EventBus} from "@/store/event-bus.js";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
data () {
|
|
7
|
-
return {
|
|
8
|
-
accountDelete: false,
|
|
9
|
-
|
|
10
|
-
changePassword: false,
|
|
11
|
-
password: '',
|
|
12
|
-
passwordRepeat: '',
|
|
13
|
-
currentPassword: '',
|
|
14
|
-
|
|
15
|
-
otpToken: null,
|
|
16
|
-
otpSecret: null,
|
|
17
|
-
mfaEnable: false,
|
|
18
|
-
otp: "",
|
|
19
|
-
qrCodeHash: null,
|
|
20
|
-
qrCodeRefreshInterval: null,
|
|
21
|
-
poolingInterval: null,
|
|
22
|
-
loading: false,
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
isModal: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
required: false,
|
|
29
|
-
default: false,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
computed: {
|
|
33
|
-
promptMFA () {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
async mounted () {
|
|
38
|
-
if (this.renderView === 'AuthSecurity') {
|
|
39
|
-
await this.getAccountSettings();
|
|
40
|
-
this.generateOTPQrCode();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
EventBus.$on('otpSubmitted', this.otpSubmitted)
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
otpSubmitted(code) {
|
|
47
|
-
this.otpToken = code;
|
|
48
|
-
|
|
49
|
-
// Assuming that the parent component had a method called submit
|
|
50
|
-
this.submit();
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import to from 'await-to-js'
|
|
2
|
-
import AuthService from '../services/AuthService'
|
|
3
|
-
import { FacebookLogin } from '@capacitor-community/facebook-login';
|
|
4
|
-
import {EventBus} from "../store/event-bus";
|
|
5
|
-
|
|
6
|
-
window.fbAsyncInit = function () {
|
|
7
|
-
// eslint-disable-next-line no-undef
|
|
8
|
-
FB.init({
|
|
9
|
-
appId: '202577611527680',
|
|
10
|
-
cookie: true, // enable cookies to allow the server to access the session
|
|
11
|
-
xfbml: true, // parse social plugins on this page
|
|
12
|
-
version: 'v16.0' // use graph api current version
|
|
13
|
-
})
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// Load the SDK asynchronously
|
|
17
|
-
(function (d, s, id) {
|
|
18
|
-
// eslint-disable-next-line one-var
|
|
19
|
-
var js, fjs = d.getElementsByTagName(s)[0]
|
|
20
|
-
if (d.getElementById(id)) return
|
|
21
|
-
js = d.createElement(s); js.id = id
|
|
22
|
-
js.src = 'https://connect.facebook.net/en_US/sdk.js'
|
|
23
|
-
fjs.parentNode.insertBefore(js, fjs)
|
|
24
|
-
}(document, 'script', 'facebook-jssdk'))
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
data () {
|
|
28
|
-
return {
|
|
29
|
-
facebookLoad: false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
computed: {
|
|
33
|
-
fbLoginUrl () {
|
|
34
|
-
return 'https://www.facebook.com/v16.0/dialog/oauth?client_id=202577611527680&state={"oauth":"facebook"}&response_type=code%20granted_scopes&scope=email&redirect_uri=https://' + window.location.host + '/login'
|
|
35
|
-
},
|
|
36
|
-
displayFacebookLogin () {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
methods: {
|
|
41
|
-
async facebookLogin () {
|
|
42
|
-
this.facebookLoad = true
|
|
43
|
-
const FACEBOOK_PERMISSIONS = ['email']
|
|
44
|
-
const [errAuth, user] = await to(FacebookLogin.login({permissions: FACEBOOK_PERMISSIONS}))
|
|
45
|
-
if (errAuth) return this.facebookLoad = false
|
|
46
|
-
|
|
47
|
-
// Track Referrals
|
|
48
|
-
if (this.referral) user.ref = this.referral;
|
|
49
|
-
|
|
50
|
-
if (this.display === 'popup') user.response_type = 'code';
|
|
51
|
-
|
|
52
|
-
if (user && user.accessToken) {
|
|
53
|
-
|
|
54
|
-
const [err, response] = await to(AuthService.facebookSDK(user, this.$storex))
|
|
55
|
-
if (err) {
|
|
56
|
-
this.facebookLoad = false
|
|
57
|
-
EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
|
|
58
|
-
return this.errorHandler(err)
|
|
59
|
-
}
|
|
60
|
-
if (response.data.success) {
|
|
61
|
-
if (this.display === 'popup') {
|
|
62
|
-
return window.parent?.postMessage({ code: response.data.auth_code, state: this.$route.query.state }, '*');
|
|
63
|
-
}
|
|
64
|
-
await this.loginSetup(response)
|
|
65
|
-
await this.getLoggedInAccounts()
|
|
66
|
-
this.$router.push('/' + response.data.data.username + '#edit')
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
this.facebookLoad = false
|
|
69
|
-
EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
|
|
70
|
-
}, 1000)
|
|
71
|
-
} else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)
|
|
72
|
-
} else {
|
|
73
|
-
this.facebookLoad = false
|
|
74
|
-
EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|