Skip to content

Commit 8692857

Browse files
committed
fix(logout): Redirect to email first if user is at settings but not valid
1 parent 572ef40 commit 8692857

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • packages/fxa-settings/src/components/App

packages/fxa-settings/src/components/App/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ export const App = ({
348348
return <LoadingSpinner fullScreen />;
349349
}
350350

351+
// If we're on settings route but user is not signed in, redirect immediately
352+
if (window.location.pathname?.includes('/settings') && !isSignedIn) {
353+
hardNavigate('/');
354+
return <LoadingSpinner fullScreen />;
355+
}
356+
351357
return (
352358
<Router basepath="/">
353359
<AuthAndAccountSetupRoutes

0 commit comments

Comments
 (0)