---
title: "POST /api/oidc/auth"
method: POST
path: "/api/oidc/auth"
tags: ["login"]
---

# POST /api/oidc/auth

`POST /api/oidc/auth`

OIDC Auth request

This entrypoint is called by the client for getting the authorization url for the Oauth2 provider he chooses

For testing you can generate a valid uuid field with the following command: `uuidgen | base64` # OIDC Auth Request

This function is an API endpoint that is called by the client to get the authorization URL for the chosen OAuth2 provider. It is tagged with "login" for OpenAPI documentation.

## Parameters

- `request`: The request data, which includes the chosen OAuth2 provider and a UUID.  <br> For testing you can generate a valid uuid field with the following command: `uuidgen | base64`

## Returns

If successful, this function returns a `Json<OidcAuthUrl>` object, which includes the authorization URL and a session code.  <br> If the UUID is invalid or the OAuth2 provider is not found, this function returns an `OidcAuthUrl` object with an empty URL and an error code.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if the UUID is invalid or the OAuth2 provider is not found.

# Example

POST /api/oidc/auth { "op": "github", "uuid": "generated_uuid_base64_encoded" }

## Request body

- OidcAuthRequest
  - `deviceInfo` OidcDeviceInfo, required
    - `name` string, required
    - `os` string, required
    - `type` string, required
  - `id` string, required
  - `op` string, required
  - `uuid` string, required

## Response `200`

- OidcAuthUrl
  - `code` string, required
  - `url` 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)
