Start GitHub OAuth sign-in (browser flow)
GET /auth/github
Sets a state cookie and redirects to GitHub. With ?next=repos (the /repos connect button) or ?next=barista (the Setup tab) the callback attaches the GitHub account to the signed-in user instead of signing in, and returns to /repos or /barista/setup; any other next is ignored. 404 auth_method_disabled when GitHub OAuth is not configured. Per-IP rate limits apply to all /auth routes.
Request
Parameters
next(query, "repos" | "barista")
Responses
302
Redirect to github.com authorize
default
Error as { error: { code, message } }
error(object, required)code("unauthorized" | "forbidden" | "not_found" | "invalid" | "conflict" | "rate_limited" | "cross_site" | "upstream", required)message(string, required)
Example
curl -X GET \
https://cupof.ai/auth/github