---
title: "OAuth callback handler"
method: GET
path: "/auth/oauth/{provider}/callback"
tags: ["OAuth Authentication"]
---

# OAuth callback handler

`GET /auth/oauth/{provider}/callback`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/auth/oauth/{provider}/callback`
- Auth: none declared

Handles OAuth provider callback with authorization code.
Exchanges code for tokens and creates/signs in user.

## Path parameters

- `provider` 'google' | 'github' | 'microsoft' | 'apple', required

## Query parameters

- `code` string, required
- `state` string, required
- `error` string

## Response `200`

Existing user signed in (when redirect_url was omitted)

- AuthTokenResponse
  - `access_token` string, required: JWT access token (expires after configured lifetime)
  - `token_type` string, required
  - `expires_in` integer, required: Access token lifetime in seconds
  - `refresh_token` string: Long-lived token for getting new access tokens. Omitted when the request uses eligible HttpOnly cookie session storage.
  - `user` AuthUser, required
    - `id` string, uuid, required
    - `project_id` string, uuid
    - `email` string, email, required
    - `email_confirmed` boolean
    - `user_metadata` object: User-editable metadata
    - `app_metadata` object: Application-controlled metadata (read-only for users)
    - `avatar_url` string, uri: User avatar URL (from OAuth provider or manually set)
    - `status` 'active' | 'banned' | 'deleted', required
    - `banned_until` string, date-time, nullable: When temporary ban expires (null if not banned or permanent)
    - `last_sign_in_at` string, date-time
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `201`: New user created and signed in (when redirect_url was omitted)
- `303`: Redirect to the exact registered redirect_url. Flows that requested response_mode=code receive a short-lived, single-use `code` and optional application `state`; compatibility flows receive the established session fragment.
- `400`: Missing/invalid code or state, the state parameter expired, or the flow's stored redirect_url is no longer registered in allowed_redirect_urls (re-checked at callback time)
- `403`: The provider's email domain is not in `allowed_email_domains`. Creating an account is refused under `signup` and `signup_and_signin`; signing in an already-linked account is refused under `signup_and_signin`.
- `409`: Email already exists (requires linking)

## Changes

- **2026-09-19** `3a6f365f3f35`: 2 breaking, 10 info
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `201`
  - added the optional property `refresh_token` to the response with the `200` status
  - added the optional property `refresh_token` to the response with the `201` status
  - …8 more
- **2026-08-27** `bb44e98aba2e`: 12 breaking, 3 info
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `201`
  - removed the required property `access_token` from the response with the `200` status
  - removed the required property `access_token` from the response with the `201` status
  - …11 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/auth/oauth/:provider/callback/get.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
