Skip to content

Appeal page shows a blank page or no message when login or the ban check fails #294

Open

Description

@LunaUrsa

Files: src/pages/appeal.tsx (exchangeCodeForToken at line 124, checkBan, and the render branches from line 554)

Problem. Two failure paths leave the user with nothing to go on:

  • Failed login. If /api/v2/keycloak/token fails or returns no access_token, the catch at line 152 ignores it. The page falls back to the "log in" screen with no message, and ?code=… stays in the URL. Before Pass the Keycloak client ID to next build (WEB-031) #266, every ban-appeal login failed exactly like this, and users had no way to tell.
  • Failed ban check. If any call in checkBan() fails (/users/banned, or getting a token), banStatus becomes "unknown". The page only renders branches for can_appeal, can_reappeal, has_appeal and not_banned, so a logged-in user sees the header and footer with an empty page in between.

Separately, the alert colour is chosen by message.includes("submitted") || message.includes("success"), so a server message worded differently shows as an error.

Fix.

  • Show an error with a retry or "log in again" button for both paths, and remove the spent code from the URL.
  • Add a branch for token && banStatus === "unknown".
  • Track success and error explicitly instead of matching on message text.

Done when. With the token or ban endpoint returning 500, the page explains what went wrong and offers a next step.

Related: #208 (ban appeal fixes).

Activity

  1. added
    Status: AvailableReady to pick up; nobody is working on it
    Type: BugSomething is broken or wrong
    Priority: MediumP2: should fix; hardening and notable improvements
    Area: AuthKeycloak login and the ban appeal page (keycloak.ts, ProfileButton.tsx, appeal.tsx)
    on Nov 8, 2026
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

    Area: AuthKeycloak login and the ban appeal page (keycloak.ts, ProfileButton.tsx, appeal.tsx)Priority: MediumP2: should fix; hardening and notable improvementsStatus: AvailableReady to pick up; nobody is working on itType: BugSomething is broken or wrong

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions