---
title: "GitHub OAuth callback — completes sign-in"
method: GET
path: "/api/auth/github/callback"
tags: ["Auth"]
---

# GitHub OAuth callback — completes sign-in

`GET /api/auth/github/callback`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/auth/github/callback`
- Auth: none required

Provider redirects here with `code` + `state`. Verifies state cookie, exchanges code, sets auth cookies, redirects to the web app. When the state carries `intent: link` (PLAT-110), no session is touched — it attaches the provider to the already-logged-in caller and redirects to Account → Security instead.

## Other responses

- `302`: Redirect to the web app post-login (or Account → Security for a link)

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
