@tapni/auth 1.0.5 → 1.0.6-3.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-XNA4_3B4.js} +34 -34
- package/dist/Billing-Br0-fHed.js +256 -0
- package/dist/CustomApp-CrlbYDOm.js +83 -0
- package/dist/QR-Bvqb60-E.js +41 -0
- package/dist/TapniAuth.es.js +1 -1
- package/dist/TapniAuth.umd.js +49 -23
- package/dist/{install-L-cxSovH.js → install-7FOVy8Ol.js} +6267 -4743
- 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 +65 -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
|
@@ -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
|
+
];
|
package/src/index.js
ADDED
package/src/install.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import App from
|
|
1
|
+
import App from './App.vue';
|
|
2
2
|
import auth from './store/auth.js';
|
|
3
3
|
|
|
4
4
|
// Export the component by default
|
|
5
5
|
export default {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
install: (app, { store, apiRoot }) => {
|
|
7
|
+
// Register the component
|
|
8
|
+
app.component('TapniAuth', App);
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (!store.hasModule('auth')) {
|
|
11
|
+
store.registerModule('auth', auth);
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
14
|
+
app.config.globalProperties.$apiRoot = apiRoot;
|
|
15
|
+
}
|
|
17
16
|
};
|
package/src/main.js
CHANGED
|
@@ -1,76 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createApp } from 'vue'
|
|
3
|
-
import RootApp from './App.vue'
|
|
4
|
-
import router from './router'
|
|
5
|
-
import VueCookies from 'vue-cookies'
|
|
1
|
+
import '@tapni/styles/dist/index.css';
|
|
2
|
+
import { createApp } from 'vue';
|
|
3
|
+
import RootApp from './App.vue';
|
|
4
|
+
import router from './router';
|
|
5
|
+
import VueCookies from 'vue-cookies';
|
|
6
6
|
import { App } from '@capacitor/app';
|
|
7
7
|
import { Browser } from '@capacitor/browser';
|
|
8
8
|
import store from './store/store.js';
|
|
9
9
|
import { sync } from 'vuex-router-sync';
|
|
10
10
|
|
|
11
|
-
const app = createApp(RootApp)
|
|
11
|
+
const app = createApp(RootApp);
|
|
12
12
|
|
|
13
|
-
app.config.productionTip = false
|
|
13
|
+
app.config.productionTip = false;
|
|
14
14
|
|
|
15
15
|
// Vuex Router Sync
|
|
16
16
|
sync(store, router);
|
|
17
17
|
|
|
18
18
|
// Cookies
|
|
19
|
-
app.use(VueCookies)
|
|
19
|
+
app.use(VueCookies);
|
|
20
20
|
|
|
21
|
-
app.use(router)
|
|
21
|
+
app.use(router);
|
|
22
22
|
|
|
23
|
-
app.use(store)
|
|
24
|
-
|
|
25
|
-
app.mount('#app')
|
|
23
|
+
app.use(store);
|
|
26
24
|
|
|
25
|
+
app.mount('#app');
|
|
27
26
|
|
|
28
27
|
function hasQueryParams(route) {
|
|
29
|
-
|
|
28
|
+
return !!Object.keys(route.query).length;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
router.beforeEach((to, from, next) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
window.scrollTo(0, 0);
|
|
34
|
+
}, 100);
|
|
35
|
+
|
|
36
|
+
if (!hasQueryParams(to) && hasQueryParams(from)) {
|
|
37
|
+
next({ name: to.name, query: from.query });
|
|
38
|
+
} else {
|
|
39
|
+
next();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* Redirect users to desired profile - DEEP LINKING
|
|
46
45
|
* @param data
|
|
47
46
|
*/
|
|
48
47
|
function redirectToProfile(data) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
if (data && data.url && data.url !== '/undefined') {
|
|
49
|
+
let url = new URL(data.url);
|
|
50
|
+
let pathname = url.pathname || '';
|
|
51
|
+
let queryParams = url.search || '';
|
|
52
|
+
if (queryParams) queryParams = Object.fromEntries(new URLSearchParams(queryParams));
|
|
53
|
+
else queryParams = {};
|
|
54
|
+
let subdomain = '';
|
|
55
|
+
//['my', 'tapni', 'co']
|
|
56
|
+
let tempArr = url.hostname.split('.');
|
|
57
|
+
if (tempArr.length === 3) subdomain = tempArr[0];
|
|
58
|
+
if (subdomain) queryParams.s = subdomain;
|
|
59
|
+
|
|
60
|
+
// open t.link shorter links in browser
|
|
61
|
+
if (pathname && /[A-Z]/.test(pathname) && !pathname.startsWith('/t/')) {
|
|
62
|
+
Browser.open({ url: url.toString() });
|
|
63
|
+
return router.push('/');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (pathname) {
|
|
67
|
+
router.push({
|
|
68
|
+
path: pathname,
|
|
69
|
+
query: queryParams
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
76
75
|
* CAPACITOR_CONFIG
|
|
@@ -78,13 +77,12 @@ function redirectToProfile(data) {
|
|
|
78
77
|
* Users who have an app should get the profiles opened in the app ie: tapni.co/tapni
|
|
79
78
|
*/
|
|
80
79
|
App.addListener('appUrlOpen', async function (data) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
80
|
+
if (data.url && data.url.startsWith('tapni://')) data.url = data.url.replace('tapni://', 'https://');
|
|
81
|
+
let url = new URL(data.url);
|
|
82
|
+
if (url.pathname.includes('/callback/')) {
|
|
83
|
+
await router.push({ path: url.pathname, query: Object.fromEntries(new URLSearchParams(url.search)) });
|
|
84
|
+
} else redirectToProfile(data);
|
|
85
|
+
});
|
|
88
86
|
|
|
89
87
|
// When the app is open and you trigger NFC event to open the app
|
|
90
88
|
// App.addListener('appStateChange', async function (l) {
|
|
@@ -93,8 +91,7 @@ App.addListener('appUrlOpen', async function (data) {
|
|
|
93
91
|
|
|
94
92
|
// When the app is closed and NFC event opens the app
|
|
95
93
|
App.getLaunchUrl().then((data) => {
|
|
96
|
-
|
|
94
|
+
redirectToProfile(data);
|
|
97
95
|
});
|
|
98
96
|
|
|
99
|
-
|
|
100
97
|
export { app };
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import to from 'await-to-js'
|
|
2
|
-
import AuthService from '../services/AuthService'
|
|
3
|
-
import {SignInWithApple} from '@capacitor-community/apple-sign-in';
|
|
1
|
+
import to from 'await-to-js';
|
|
2
|
+
import AuthService from '../services/AuthService';
|
|
3
|
+
import { SignInWithApple } from '@capacitor-community/apple-sign-in';
|
|
4
4
|
|
|
5
|
-
import { jwtDecode } from
|
|
6
|
-
import {EventBus} from '../store/event-bus';
|
|
5
|
+
import { jwtDecode } from 'jwt-decode';
|
|
6
|
+
import { EventBus } from '../store/event-bus';
|
|
7
7
|
export default {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
data() {
|
|
9
|
+
return {
|
|
10
|
+
appleLoad: false
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
computed: {
|
|
14
|
+
displayAppleLogin() {
|
|
15
|
+
return (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'ios') || (!Capacitor.isNativePlatform() && this.isiOS);
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
async appleLogin() {
|
|
20
|
+
this.appleLoad = true;
|
|
21
|
+
const [errAuth, user] = await to(
|
|
22
|
+
SignInWithApple.authorize({
|
|
23
|
+
clientId: 'co.tapni.applelogin',
|
|
24
|
+
redirectURI: 'https://' + window.location.host + '/login',
|
|
25
|
+
scopes: 'email name'
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
if (errAuth) return (this.appleLoad = false);
|
|
29
|
+
user.response.tokenData = jwtDecode(user.response.identityToken);
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
if (user && user.response && user.response.identityToken) {
|
|
32
|
+
// Track Referrals
|
|
33
|
+
if (this.referral) user.response.ref = this.referral;
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
// Code Login
|
|
36
|
+
if (this.display === 'popup') user.response_type = 'code';
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
38
|
+
const [err, response] = await to(AuthService.appleSDK(user.response, this.$storex));
|
|
39
|
+
if (err) {
|
|
40
|
+
this.appleLoad = false;
|
|
41
|
+
EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
|
|
42
|
+
return this.errorHandler(err);
|
|
43
|
+
}
|
|
44
|
+
if (response.data.success) {
|
|
45
|
+
if (this.display === 'popup') {
|
|
46
|
+
return window.parent?.postMessage({ code: response.data.auth_code, state: this.$route.query.state }, '*');
|
|
47
|
+
}
|
|
48
|
+
await this.loginSetup(response);
|
|
49
|
+
await this.getLoggedInAccounts();
|
|
50
|
+
this.loginSuccess({ ...response, isModal: this.isModal });
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
this.appleLoad = false;
|
|
53
|
+
}, 1000);
|
|
54
|
+
} else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
55
|
+
} else {
|
|
56
|
+
this.appleLoad = false;
|
|
57
|
+
EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
package/src/mixins/auth.mixin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createNamespacedHelpers } from 'vuex';
|
|
2
2
|
const { mapState, mapActions, mapGetters } = createNamespacedHelpers('auth');
|
|
3
|
-
import GlobalMixin from './global.mixin'
|
|
3
|
+
import GlobalMixin from './global.mixin';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
mixins: [GlobalMixin],
|
|
@@ -64,6 +64,7 @@ export default {
|
|
|
64
64
|
'setRedirectUri',
|
|
65
65
|
'setDisplay',
|
|
66
66
|
'setState',
|
|
67
|
+
'setRealm',
|
|
67
68
|
'setResponseType',
|
|
68
69
|
'switchAccount',
|
|
69
70
|
'loginSetup',
|
|
@@ -78,7 +79,7 @@ export default {
|
|
|
78
79
|
if (this.$route.query.display) this.setDisplay(this.$route.query.display);
|
|
79
80
|
if (this.$route.query.state) this.setState(this.$route.query.state)
|
|
80
81
|
if (this.$route.query.response_type) this.setResponseType(this.$route.query.response_type);
|
|
81
|
-
if (this.$route.query.realm
|
|
82
|
+
if (this.$route.query.realm) this.setRealm(this.$route.query.realm);
|
|
82
83
|
},
|
|
83
84
|
deep: true,
|
|
84
85
|
},
|
|
@@ -30,10 +30,10 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
methods: {
|
|
32
32
|
getIcon(icon) {
|
|
33
|
-
if (!this.isNative
|
|
33
|
+
if (!this.isNative) {
|
|
34
34
|
return 'https://cdn.tapni.co/icons/' + icon;
|
|
35
35
|
} else {
|
|
36
|
-
return
|
|
36
|
+
return `/icons/${icon}`;
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
errorHandler(error) {
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
try {
|
|
111
111
|
return await window.grecaptcha.execute(import.meta.env.VITE_APP_GOOGLE_RECAPTCHA_SITE_KEY, {action: action});
|
|
112
112
|
} catch (err){
|
|
113
|
-
console.
|
|
113
|
+
console.error('grecaptcha_error', err)
|
|
114
114
|
return null
|
|
115
115
|
}
|
|
116
116
|
},
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import to from 'await-to-js'
|
|
2
|
-
import AuthService from '../services/AuthService'
|
|
3
|
-
import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth'
|
|
4
|
-
import {EventBus} from
|
|
1
|
+
import to from 'await-to-js';
|
|
2
|
+
import AuthService from '../services/AuthService';
|
|
3
|
+
import { GoogleAuth } from '@codetrix-studio/capacitor-google-auth';
|
|
4
|
+
import { EventBus } from '../store/event-bus';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
googleLoad: false
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
displayGoogleLogin() {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
mounted() {
|
|
18
|
+
GoogleAuth.initialize();
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
async googleLogin() {
|
|
22
|
+
this.googleLoad = true;
|
|
23
|
+
let [errAuth, user] = await to(GoogleAuth.signIn());
|
|
24
|
+
if (errAuth) return (this.googleLoad = false);
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (errAuth) return this.googleLoad = false
|
|
26
|
+
// Track Referrals
|
|
27
|
+
if (this.referral) user.ref = this.referral;
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
if (user.authentication && (user.authentication.accessToken || user.authentication.idToken)) {
|
|
30
|
+
// Track Referrals
|
|
31
|
+
if (this.referral) user.ref = this.referral;
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (this.referral) user.ref = this.referral;
|
|
33
|
+
// Code Login
|
|
34
|
+
if (this.display === 'popup') user.response_type = 'code';
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
36
|
+
const [err, response] = await to(AuthService.googleSDK(user, this.$storex));
|
|
37
|
+
if (err) {
|
|
38
|
+
this.googleLoad = false;
|
|
39
|
+
EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
|
|
40
|
+
return this.errorHandler(err);
|
|
41
|
+
}
|
|
42
|
+
if (response.data.success) {
|
|
43
|
+
if (this.display === 'popup') {
|
|
44
|
+
return window.parent?.postMessage({ code: response.data.auth_code, state: this.$route.query.state }, '*');
|
|
45
|
+
}
|
|
46
|
+
await this.loginSetup(response);
|
|
47
|
+
await this.getLoggedInAccounts();
|
|
48
|
+
this.loginSuccess({ ...response, isModal: this.isModal });
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
this.googleLoad = false;
|
|
51
|
+
}, 1000);
|
|
52
|
+
} else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
|
|
53
|
+
} else {
|
|
54
|
+
this.googleLoad = false;
|
|
55
|
+
EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -27,14 +27,11 @@ export default {
|
|
|
27
27
|
scopes: ["User.Read"],
|
|
28
28
|
knownAuthorities: [],
|
|
29
29
|
keyHash: "4+5wCp8QcLptlO0aeP5RDTTOWyg=", // Android,
|
|
30
|
-
redirectUri:
|
|
31
|
-
import.meta.env.DEV
|
|
32
|
-
? `${window.location.origin}/login`
|
|
33
|
-
: "https://" + window.location.host + "/login",
|
|
30
|
+
redirectUri: `${window.location.origin}/login`
|
|
34
31
|
})
|
|
35
32
|
);
|
|
36
33
|
if (errAuth) {
|
|
37
|
-
console.
|
|
34
|
+
console.error("MsAuthPlugin Error: " + JSON.stringify(errAuth));
|
|
38
35
|
return (this.microsoftLoad = false);
|
|
39
36
|
}
|
|
40
37
|
|
package/src/mixins/okta.mixin.js
CHANGED
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
//if (response && response.data && response.data.url) {
|
|
90
90
|
let code;
|
|
91
91
|
window.addEventListener("message", async (message)=> {
|
|
92
|
-
if (!this.allowedOriginsAuth.includes(message.origin)) return console.
|
|
92
|
+
if (!this.allowedOriginsAuth.includes(message.origin)) return console.error('Origin is not allowed!');
|
|
93
93
|
if(message.data.type === 'okta') {
|
|
94
94
|
code = message.data.code;
|
|
95
95
|
await self.exchangeCode({domain: data.domain, code, clientID: data.clientID});
|