---
title: "OIDC callback"
method: GET
path: "/callback"
tags: ["authentication"]
---

# OIDC callback

`GET /callback`

## Query parameters

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

## Cookies

- `saved-state` string, required
- `nonce` string, required

## Response `200`

OIDC callback successful

- OidcCallbackOk
  - `OAuth2Token` object, required — Oauth2 Token object
    - `access_token` string, required
    - `token_type` string
    - `refresh_token` string
    - `expiry` string, date-time
    - `expires_in` integer
  - `UserInfo` object, required — OIDC UserInfo object
    - `sub` string, required — subject of user
    - `profile` string, required
    - `email` string, required
    - `email_verified` boolean, required

## Other responses

- `400` — OIDC callback failed due to invalid code or state
- `500` — Internal Server Error

## Changes

- **2024-11-13** `8741342e62ea` — 1 breaking
  - added the new required `cookie` request parameter `nonce`
- **2024-11-12** `3a8704b4afd3` — 1 breaking, 4 warning, 2 info
  - the response's body type changed from no type to `object` for status `200`
  - removed the optional property `access_token` from the response with the `200` status
  - removed the optional property `email` from the response with the `200` status
  - removed the optional property `id_token` from the response with the `200` status
  - …3 more

[Change history](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/changes/callback/get.md)

---

[API](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api.md) · [All operations](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swissopenem/scicat-ingestor-api/revisions/8741342e62ea/schema)
