Auth

Authenticate with email and password

Changed on

#2587 p19 two-step (migration 665): when the person has two-step on and this browser is not trusted (the httpOnly median_trusted_browser cookie), a correct password answers { twoStepRequired: true, challengeToken, expiresIn: 300 } with no tokens and no cookie; finish with POST /auth/two-step/verify or /auth/two-step/recover. Google sign-in (POST /auth/google) follows the same rule.

post/auth/login

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    none required

Request body

LoginInput required
email, string email required
password, string required

Example request

{
  "email": "alice@example.com",
  "password": "supersecret123"
}

Response

Authentication successful, or a two-step challenge

union required
AuthResponse required
OR
TwoStepChallenge required

#2587 p19: a correct password with two-step on; finish with /auth/two-step/verify or /recover within expiresIn seconds.

Example response

{
  "success": true
}

Changes

    • breaking

      the response's body type changed from object to no type for status

    • warning

      removed the optional property data from the response with the status

    • warning

      removed the optional property success from the response with the status

    1 more change in this revision