Document how to create the GitHub OAuth App, including the /api/callback path

Offen Anfängerfreundlich
#645 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
68/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Bereich
documentation

Rechercherichtung

Beginne mit dem Abschnitt Configuration in docs/peer-interviews.md und prüfe docs/install.md, um die beste Stelle für die OAuth-Einrichtungsschritte und den Querverweis zu finden. Dokumentiere die App-Erstellung, die Homepage- und Callback-URLs, wo das Client Secret gespeichert werden soll und den erforderlichen Neustart; prüfe Issue #643 zum Verhalten der Redirect URI. Fertig ist es, wenn ein Betreiber GitHub-Anmeldung anhand der Dokumentation konfigurieren kann, ohne src/web/auth.rs zu lesen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

docs/peer-interviews.md (Configuration) says reciprocal practice needs GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, and config/codetrial.env.example lists the same variables, but nothing says how to create the GitHub OAuth App they come from. In particular, the callback path /api/callback does not appear anywhere in docs/, README.md or config/codetrial.env.example (at 5e00eab).

What goes wrong without it: an operator who enters only the origin, such as https://example.trycloudflare.com, as the redirect URI gets a sign-in that GitHub completes but CodeTrial never finishes. GitHub redirects to /?code=..., the home page ignores the code, and the user lands on the AI practice page still signed out. Nothing on screen points at the redirect URI. This happened while setting up reciprocal practice for a class.

Intended correction: a short section, in docs/peer-interviews.md or docs/install.md with a link from the other, that covers:

  • where to create the app (GitHub Settings, Developer settings, OAuth Apps);
  • Homepage URL: the origin users open, for example http://127.0.0.1:3000;
  • Authorization callback URL: that origin followed by /api/callback;
  • that the client secret is shown once and goes in GITHUB_CLIENT_SECRET;
  • that the server reads the config only at startup, so it must be restarted after editing it.

Reader outcome: an operator can go from no OAuth App to a working Sign in with GitHub without reading src/web/auth.rs.

How many redirect URIs the app may have depends on #643, the missing redirect_uri parameter; this section should state whatever that one settles.

Vorherrschende Sprache
Rust
Sterne
228
Forks
150
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
230

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sysprog21/codetrial

Alle Issues in sysprog21/codetrial

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.