---
title: "Oauth Callback"
method: GET
path: "/api/auth/oauth/{provider_name}/callback"
tags: ["Authentication"]
---

# Oauth Callback

`GET /api/auth/oauth/{provider_name}/callback`

## Request

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

Provider hands back a code; trade it for tokens, resolve the user, open a
session and bounce back to the site.

Failures redirect to the frontend with ?auth_error=... rather than rendering
a raw API error page at the end of a login the user started in the UI.

## Path parameters

- `provider_name` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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