8000 auth: the Support page reflects whether the visitor is signed in · Issue #408 · stratum-mining/sv2-ui · GitHub
[go: up one dir, main page]

Skip to content

auth: the Support page reflects whether the visitor is signed in #408

Open

Description

@warioishere

Affected layers

  • Frontend (src/): affected. src/App.tsx routes /faq outside LoginGate, so it stays reachable without a session, while src/pages/FAQ.tsx always renders the signed-in Shell (Dashboard and Settings navigation, Log out button, pool connection status) and polls the status endpoints.
  • Backend (server/): not affected. POST /api/auth/logout destroys the session and clears the cookie. Afterwards /api/auth/state reports authenticated: false and the protected routes answer 401.
  • shared/: not affected.

Problem

Clicking Log out on the Support page (/faq) ends the session, but the page stays as it was: same URL, signed-in navigation, Log out button, and the header switches to "Disconnected" because the status requests now get 401. No login form appears, so the logout looks like it did nothing.

The login screen links the same page ("Support & FAQ"), so a visitor without a session gets the signed-in navigation and a Log out button there too, with status requests failing in the background.

Reproduced with headless Chromium against an image built from 828dad4: after Log out on /faq, /api/auth/state is refetched and returns authenticated: false, the URL stays /faq and no login form is rendered.

Expected outcome

  • Logging out from the Support page takes the operator to the login screen, as logging out does on the pages behind LoginGate.
  • A visitor without a session who opens the Support page sees the FAQ without signed-in navigation, Log out button or connection status, and the page sends no requests to protected endpoints.
  • The Support page stays reachable without a session.

Related issues and PRs

Activity

  1. warioishere commented on Nov 7, 2026

    @warioishere
    Author

    Correction: the reproduction ran against an image built from 43cd916, which is 828dad4 plus the commits of #407. #407 does not touch src/App.tsx, LoginGate or the logout flow, so the behaviour is the same on main.

    No related issue in sv2-apps: the defect sits only in the sv2-ui frontend, so the fix belongs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0