OpenChat icon indicating copy to clipboard operation
OpenChat copied to clipboard

Logging out from Settings lands on the sign-in page instead of home

Open ajanraj opened this issue 1 month ago • 0 comments

Problem

"Log out" in the Settings header shows the "Logged out" toast but leaves the user on the sign-in page (/auth) instead of home.

Repro

  1. Sign in and open /settings.
  2. Click "Log out" (top right).
  3. You land on /auth with the "Logged out" toast.

Seen on the dev deployment while smoke-testing #84. src/routes/settings.tsx and src/components/header-go-back.tsx are unchanged from main; not re-checked on main itself.

Likely cause

handleSignOut in src/components/header-go-back.tsx awaits signOut() and then navigates to /. Settings is still mounted while that navigation runs, so SettingsLayout's effect (src/routes/settings.tsx:16) sees no user and navigates to /auth, and that navigation wins.

Expected

Home, the same as "Log out" from the avatar menu.

Possible fixes

  • Leave Settings before signing out (navigate home, then call signOut).
  • Or skip the redirect in SettingsLayout while a sign-out is in progress.

ajanraj avatar Oct 16 '26 15:10 ajanraj