---
title: "OIDC State"
method: GET
path: "/api/oidc/auth-query"
tags: ["login"]
---

# OIDC State

`GET /api/oidc/auth-query`

This function is an API endpoint that checks the state of an OpenID Connect (OIDC) session. It is tagged with "login" for OpenAPI documentation.

## Parameters

- `code`: The authorization code received from the OIDC provider.

- `id`: The identifier of the OIDC session.

- `uuid`: The UUID of the OIDC session.

## Returns

If successful, this function returns a `Json<Option<OidcResponse>>` object.  <br> If the session does not exist, this function returns `Json(None)`.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if the session does not exist.

# Example

GET /api/oidc/auth-query?code=authorization_code&id=session_id&uuid=session_uuid

## Query parameters

- `code` string, required
- `id` string, required
- `uuid` string, required

## Response `200`

- OidcResponse
  - `access_token` string, required
  - `type` string, required
  - `tfa_type` string, required
  - `secret` string, required
  - `user` OidcUser, required
    - `name` string, required
    - `email` string, required
    - `note` string, required
    - `status` integer, required
    - `info` OidcUserInfo, required
      - `email_verification` boolean, required
      - `email_alarm_notification` boolean, required
      - `login_device_whitelist` string[], required
      - `other` object, required
    - `is_admin` boolean, required
    - `third_auth_type` string, required

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
