---
title: "Login Options"
method: GET
path: "/api/login-options"
tags: ["login"]
---

# Login Options

`GET /api/login-options`

This is called by the client for knowing the Oauth2 provider(s) available You must provide a list of Oauth2 providers in the `oauth2.toml` config file The config file can be overridden by the `OAUTH2_CONFIG_FILE` environment variable

This function is an API endpoint that is called by the client to get the list of available OAuth2 providers. The list of providers is defined in the `oauth2.toml` config file, which can be overridden by the `OAUTH2_CONFIG_FILE` environment variable. It is tagged with "login" for OpenAPI documentation.

## Limitations

It needs to be completed for mapping the username and email from the OAuth2 provider to the SCTGDesk user.

## Parameters

- none

## Returns

If successful, this function returns a `Json<Vec<String>>` object, which includes the list of available OAuth2 providers.  <br> If the config file is not found or cannot be read, this function returns a `status::Unauthorized` error.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if the config file is not found or cannot be read.

# Example

GET /api/login-options

## Response `200`

- string[]

## Other responses

- `401`

---

[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)
