Skip to content

Document registering the GitHub OAuth App - #685

Merged
jserv merged 1 commit into
sysprog21:mainfrom
Patriciaath999:document-oauth-app
Nov 15, 2026
Merged

jserv merged 1 commit into
sysprog21:mainfrom
Patriciaath999:document-oauth-app

Conversation

@Patriciaath999

@Patriciaath999 Patriciaath999 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

The docs named GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET but not the OAuth App they come from, and /api/callback appeared nowhere in docs/, README.md or config/codetrial.env.example. An operator who registered only the origin as the callback got a sign-in GitHub completed and the server never finished: GitHub returned to /?code=..., which nothing reads.

docs/peer-interviews.md gains a subsection under Configuration, "The GitHub OAuth App", covering where to register the app, the Homepage URL, the callback URL as the origin followed by /api/callback, the config file the client ID and secret go in, the client secret GitHub shows only once, and the restart the config needs. It states the single callback settled on #643: login_handler sends no redirect_uri, so GitHub returns every sign-in to the first URL registered, and the state cookie belongs to the host, so a sign-in started at another host fails with either of the two state errors. With NODE_ENV=production the cookies are Secure, so the origin and the callback URL have to be https://. docs/install.md links to the subsection from its paragraph on the config file.

Validation: documentation only. The pre-commit and commit-msg hooks passed; the error text quoted, Login state is missing or expired., matches src/web/auth.rs at c54aed7, as does Login state did not match.

#561 also edits docs/install.md, in the paragraph just above the one changed here; the hunks do not overlap.

Close #645
Close #643

cubic-dev-ai[bot]

This comment was marked as resolved.

jserv

This comment was marked as resolved.

jserv

This comment was marked as resolved.

jserv

This comment was marked as outdated.

jserv

This comment was marked as resolved.

jserv

This comment was marked as resolved.

The docs named GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET but not the
OAuth App they come from, and the callback path /api/callback appeared
nowhere, so an operator who registered only the origin got a sign-in
GitHub completed and the server never finished.

docs/peer-interviews.md now walks through registering the app: the
callback URL, the config file the client ID and secret go in, the
one-time secret and the restart. It states that the app carries exactly
one callback URL, since the server sends no redirect_uri and GitHub
returns every sign-in to the first one registered, where a sign-in
started at another host arrives without its state cookie (sysprog21#643).
docs/install.md links to it.

Close sysprog21#645
Close sysprog21#643

Change-Id: Ia24630fd4238ebdb3685e4a0b3e51167973b17cf
@jserv
jserv added this pull request to the merge queue Nov 15, 2026
@jserv

jserv commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Thank @Patriciaath999 for contributing!

Merged via the queue into sysprog21:main with commit 2021548 Nov 15, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document how to create the GitHub OAuth App, including the /api/callback path GitHub sign-in fails when the OAuth App has more than one redirect URI

2 participants