---
title: "Unified Sign In"
method: POST
path: "/us-signin"
---

# Unified Sign In

`POST /us-signin`

## Query parameters

- `include_auth_token` string

## Request body

- UsSignin
  - `identity` string, required — Configured by SECURITY_USER_IDENTITY_ATTRIBUTES
  - `passcode` string, required — password or code
  - `remember` boolean

## Response `200`

Unified Sign In response

- object — The user successfully signed in using their primary credentials. Note that depending on the SECURITY_TWO_FACTOR and SECURITY_US_MFA_REQUIRED configuration variables, a second form of authentication might be required prior to the user being fully authenticated. `tf_required` will be set to True in this case.
  - `meta` object, required
    - `code` integer, required — Http status code
  - `response` object, required
    - `user` object — By default an empty dictionary is returned. However by overriding _User::get_security_payload()_ any attributes of the User model can be returned.
      - `authentication_token` string — Token to be used in future token-based API calls. Note this only returned from those APIs that accept a 'include_auth_token' query param.
      - `refresh_token` string — A refresh token that can be used to get a new auth token. This is only returned if the application has enabled refresh tokens.
    - `csrf_token` string — Session CSRF token
    - `tf_required` boolean — True if two-factor authentication is required for caller.
    - `tf_state` string — if "setup_from_login" then the caller must go through two-factor setup endpoint. If "ready" then a code has been sent and should be supplied to SECURITY_TWO_FACTOR_TOKEN_VALIDATION_URL.
    - `tf_method` string — Which method was used to send code.
    - `tf_select` boolean — If user has setup multiple forms of two-factor authentication, this will be True and the application should prompt the user for which method they want to use.
    - `tf_setup_methods` string[]

## Other responses

- `302` — If the caller already authenticated, the form contents are ignored and a redirect is done: redirect(SECURITY_POST_LOGIN_VIEW) (note that 'next' is ignored). If the caller is NOT already authenticated, and the form contents are validated the caller will be redirected to: redirect(next) or redirect(SECURITY_POST_LOGIN_VIEW)
- `400` — Errors while validating attributes, or caller already authenticated/logged in.

---

[API](https://skmtc.net/pallets-eco/apis/flask-security-external-api.md) · [All operations](https://skmtc.net/pallets-eco/apis/flask-security-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pallets-eco/flask-security-external-api/versions/5ee7c28d6e1e/schema)
