---
title: "Authenticate a user with OpenID Connect"
method: POST
path: "/auth/openid/{provider}/callback"
tags: ["auth"]
---

# Authenticate a user with OpenID Connect

`POST /auth/openid/{provider}/callback`

After a redirect from the OpenID Connect provider to the frontend has been made with the authentication `code`, this endpoint can be used to obtain a jwt token for that user and thus log them in.

## Path parameters

- `provider` integer, required

## Request body

- OpenidCallback
  - `code` string
  - `redirect_url` string
  - `scope` string

## Response `200`

OK

- AuthToken
  - `token` string

## Other responses

- `500` — Internal error

## Changes

- **2025-07-28** `d7c1f946dc48` — 1 info
  - removed the non-success response with the status `412`

[Change history](https://skmtc.dev/go-vikunja/apis/vikunja-api/changes/auth/openid/:provider/callback/post.md)

---

[API](https://skmtc.dev/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.dev/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/revisions/1f6b4639ccfd/schema)
