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

Aperta Adatta ai principianti
#645 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
documentation

Direzione di ricerca

Inizia dalla sezione Configuration in docs/peer-interviews.md e consulta docs/install.md per trovare il punto migliore in cui aggiungere i passaggi di configurazione di OAuth e il collegamento incrociato. Documenta la creazione dell’app, gli URL della homepage e di callback, dove archiviare il client secret e il riavvio richiesto; consulta l’issue #643 sul comportamento della redirect URI. Il lavoro è completo quando un operatore può configurare l’accesso con GitHub seguendo la documentazione senza leggere src/web/auth.rs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
228
Fork
150
Merge medio
1g 3h
PR unite (30g)
230

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sysprog21/codetrial

Tutte le issue di sysprog21/codetrial

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.