From c6c48d9a182e902c122c5d373f39d354d1d2b52b Mon Sep 17 00:00:00 2001 From: doregg Date: Thu, 4 Jan 2024 12:23:26 +0200 Subject: [PATCH] pr --- packages/vue/src/auth/mapAuthState.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/vue/src/auth/mapAuthState.ts b/packages/vue/src/auth/mapAuthState.ts index 005d3c18..9a62201e 100644 --- a/packages/vue/src/auth/mapAuthState.ts +++ b/packages/vue/src/auth/mapAuthState.ts @@ -163,7 +163,7 @@ export const useLoadEntitlements = () => { */ export const useIsSteppedUp = (options?: IsSteppedUpOptions) => { return computed(() => { - const { user } = inject(authStateKey); + const { user } = inject(authStateKey) || {}; return isSteppedUp(user, options); }); }; @@ -241,12 +241,6 @@ export const useFronteggAuthGuard = (options?: FronteggAuthGuardOptions) => { localStorage.setItem(FRONTEGG_AFTER_AUTH_REDIRECT_URL, redirectUrl); } - if (options?.isRequestHostedLoginAuthorizedV2) { - // first time is not a good naming. Here we pass true to check if the active url is oauth/callback to avoid silent refresh and fix a step up bug related to Fallback route - fronteggAuth.loginActions.requestHostedLoginAuthorizeV2({firstTime: true, shouldRedirectToLogin: true}); - return; - } - fronteggAuth.loginActions.requestHostedLoginAuthorize(); } else { router.push(authState.routes.loginUrl);