---
title: "Complete login/consent for an authorization request"
method: POST
path: "/oauth2/login"
tags: ["authentication"]
---

# Complete login/consent for an authorization request

`POST /oauth2/login`

Called by the consent UI after user authenticates and consents. Sets the user on the auth request and redirects back to the client with an authorization code.

## Request body

- OAuth2LoginRequest
  - `requestId` string, uuid, required

## Response `200`

Authorization completed, redirect URL returned

- OAuth2LoginCompleteResponse
  - `redirectUri` string, uri, required

## Other responses

- `default` — An error occurred

---

[API](https://skmtc.net/nhost/apis/nhost-authentication-api.md) · [All operations](https://skmtc.net/nhost/apis/nhost-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nhost/nhost-authentication-api/revisions/a5c0d88b55c4/schema)
