---
title: "Oauth Callback"
method: GET
path: "/auth/callback"
tags: ["authentication"]
---

# Oauth Callback

`GET /auth/callback`

## Request

- Base URL: `https://api.codeofpaper.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.codeofpaper.com/auth/callback`
- Auth: none declared

Handle GitHub OAuth callback.

Exchange authorization code for access token, fetch user info,
and create/update user in database.

Returns JWT tokens for authentication.

## Query parameters

- `code` string, required: Authorization code from GitHub
- `state` string, nullable: State parameter for CSRF protection

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api.md) · [All operations](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codeofpaper/apis/code-of-paper-dev-api/revisions/94ea47fd4aa1?raw)
