> For the complete documentation index, see [llms.txt](https://developers.vinid.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.vinid.net/tai-lieu-tich-hop/tich-hop-vinid-sso/auth-endpoint.md).

# Auth endpoint

## /oauth2/auth

<mark style="color:blue;">`GET`</mark> `https://oauth-qc.vinid.dev/oauth2/auth`

API Này sử dụng cho luồng Authorization code (PKCE), sau khi authentication thành công, một authorization code (query parameter) sẽ được redirect về callback endpoint của ứng dụng.

#### Query Parameters

| Name                    | Type   | Description |
| ----------------------- | ------ | ----------- |
| code\_challenge\_method | string |             |
| code\_challenge         | string |             |
| state                   | string |             |
| scope                   | string |             |
| response\_type          | string | code        |
| redirect\_uri           | string |             |
| client\_id              | string |             |

{% tabs %}
{% tab title="302 " %}

```
```

{% endtab %}
{% endtabs %}

| Tham số                 | Định đạng | Mô tả | Ví dụ                         |
| ----------------------- | --------- | ----- | ----------------------------- |
| client\_id              | string    |       | 1mg                           |
| redirect\_uri           | string    |       | <http://example.com/callback> |
| response\_type          | string    |       | code                          |
| scope                   | string    |       | openid offline profile        |
| state                   | string    |       |                               |
| code\_challenge         | string    |       |                               |
| code\_challenge\_method | string    |       | S256                          |
