aboutsummaryrefslogtreecommitdiff
path: root/front-end/src/store/socialMfaPlugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'front-end/src/store/socialMfaPlugin.ts')
-rw-r--r--front-end/src/store/socialMfaPlugin.ts16
1 files changed, 6 insertions, 10 deletions
diff --git a/front-end/src/store/socialMfaPlugin.ts b/front-end/src/store/socialMfaPlugin.ts
index 2f78f3a..79cb088 100644
--- a/front-end/src/store/socialMfaPlugin.ts
+++ b/front-end/src/store/socialMfaPlugin.ts
@@ -1,11 +1,10 @@
-
import 'pinia'
import { MaybeRef } from 'vue';
import {
useUser,
useOauthLogin,
- useSocialDefaultLogout,
- fetchSocialPortals,
+ useSocialDefaultLogout,
+ fetchSocialPortals,
fromSocialPortals,
fromSocialConnections,
} from '@vnuge/vnlib.browser'
@@ -41,25 +40,22 @@ export const socialMfaPlugin = (portalEndpoint?: MaybeRef<string>): PiniaPlugin
}
/*
- Try to load social methods from server, if it fails, then we will
- fall back to default
+ Try to load social methods from server, if it fails, then we will
+ fall back to default
*/
defer(async () => {
try {
-
+
const portals = await fetchSocialPortals(get(portalEndpoint)!);
const social = fromSocialPortals(portals);
const methods = fromSocialConnections(social);
//Create social login from available portals
const login = useOauthLogin(methods);
-
- const socialOauth = useSocialDefaultLogout(login, logout);
-
- console.log(login.methods)
+ const socialOauth = useSocialDefaultLogout(login, logout);
resolve(socialOauth)
} catch (error) {