A failed GitHub sign-in shows only a JSON error

Ouverte
#644 2 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Ray891220 y travaille déjà.

Depuis le 10/11/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

A failed GitHub sign-in leaves the user on a page that shows only a JSON object, such as {"error":"Login state is missing or expired."}. There is no explanation of what went wrong and no link back to where the sign-in started, so the only way on is to edit the address bar.

Who is affected: anyone signing in with GitHub, which reciprocal practice requires, and the operator they ask for help.

Where it comes from: callback_response in src/web/auth.rs (at 5e00eab) returns json_response for every failure of a browser navigation, not an API call. Reachable cases include:

  • Missing GitHub callback code.: GitHub sends the user back with ?error=access_denied and no code when they press Cancel on the authorization page.
  • Missing GitHub callback state.
  • Login state is missing or expired.: the state cookie is absent, for example after a slow authorization or when the callback lands on a different origin than the one that started the sign-in.
  • Login state did not match.

Desired outcome: a failed sign-in shows a readable page that names the likely cause in a sentence and offers a link that starts sign-in again, returning to the page the user came from (/peer-lobby when the sign-in began there).

Acceptance criteria:

  • Pressing Cancel on GitHub's authorization page lands on a page that says the sign-in was cancelled and offers to try again.
  • An expired or missing state shows a page that suggests signing in again from the same address, with a working link.
  • API clients that call these routes, if any, still get a status code they can test; the change concerns what a browser renders.

Current workaround: open /peer-lobby again by hand and press Sign in with GitHub.

Langage dominant
Rust
Étoiles
228
Forks
150
Merge moyen
1 j 3 h
PR mergées (30 j)
230

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sysprog21/codetrial

Toutes les issues de sysprog21/codetrial

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.