Skip to main content

Login

POST 

/api/auth/login

Authenticates a user with email and password.

A login alert will be sent to the user's email if this setting is enabled email is enabled and configured correctly.

If there is an account associated with the given email address but this account did not set up password authentication, an Identity Provider Information email will be sent if email is enabled.

Optional session data:

  • The session object can be included in the request body.
  • Inside the session object, you can provide the following optional fields:
    • browser: The name of the browser used (e.g., "Chrome", "Firefox").
    • os: The operating system of the device (e.g., "Windows", "macOS", "Android").

This information helps users identify and manage authorized sessions, improving overall account security.

2FA:

If the user enabled 2FA, the user will not be authenticated immediately. Instead, a TwoFactorAuthenticationToken is set as HTTP-only cookie and returned in the response body if header authentication is enabled.

You can complete the login through the endpoint POST /api/auth/2fa/login.

Locale

A locale can be specified for this request. This will be used for the email 2FA code if this method is enabled for the user. You can learn more about 2FA through email here.

If no locale is specified, the applications default locale will be used. You can learn more about configuring the default locale here.

Tokens

Request

Responses

Authentication successful. Returns tokens and user details.