Skip to content

Commit

Permalink
pr
Browse files Browse the repository at this point in the history
  • Loading branch information
doregg committed Jan 4, 2024
1 parent e1534c5 commit c6c48d9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/vue/src/auth/mapAuthState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c6c48d9

Please sign in to comment.