---
title: "Logs in a user"
method: GET
path: "/api/auth/login"
tags: ["Authentication"]
deprecated: true
---

# Logs in a user

`GET /api/auth/login`

## Request

- Base URL: `https://passivelogic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://passivelogic.com/api/auth/login`
- Auth: one of:
  - API key in header `X-PL-AUTH`
  - API key in header `Authorization: PL-API-KEY`
  - API key in header `PL-API-KEY`
  - HTTP basic
- TypeScript: <https://skmtc.dev/passivelogic/apis/passivelogic-http-api/docs/api/auth/login/get.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

DEPRECATED: This endpoint is not available when Keycloak authentication is turned on and will be removed in the future.

Logs in a user. If multi-factor authentication is enabled, returns a multi-factor token that can be used to
send a multi-factor code to the user. Otherwise, sets auth & refresh tokens as cookies and returns a whoami for the
logged in user.

Basic authentication required.

## Response `200`

OK

- LoginResponse: Generic response information
  - `refresh` string, required: Signed refresh JWT
  - `whoAmI` WhoAmIResponse, required: Information about the authenticated user
    - `userID` string, uuid, required: Unique ID for the user
    - `eulaAccepted` boolean, nullable: Flag to mark if the user has acept the terms of the EULA
    - `emailVerified` boolean, nullable: Flag to mark if the user's email is verified
    - `firstName` string, nullable: User's first name
    - `lastName` string, nullable: User's last name
  - `token` string, required: Signed Authentication JWT

---

[API](https://skmtc.dev/passivelogic/apis/passivelogic-http-api.md) - [All operations](https://skmtc.dev/passivelogic/apis/passivelogic-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/passivelogic/apis/passivelogic-http-api/revisions/28fce63bcdbb?raw)
