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

# OAuth callback

`GET /oauth/{provider}/callback`

Handles the OAuth callback flow for the specified provider.

## Path parameters

- `provider` string, required

## Query parameters

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

## Response `200`

OK

- OauthLoginResponse
  - `id` string — The unique identifier for the authenticated user (e.g., Google user ID).
  - `token` string — The access token used for API requests. Typically expires after a short duration.
  - `refreshtoken` string — The refresh token used to obtain new access tokens once the current one expires.
  - `expiresin` integer — The duration in seconds that the access token is valid for.

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/loxilb-io/apis/loxilb-rest-api.md) · [All operations](https://skmtc.net/loxilb-io/apis/loxilb-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loxilb-io/loxilb-rest-api/revisions/45e9f0a95af0/schema)
