Authentication (Allauth Headless)

In order to safeguard the account, some actions require the user to be recently authenticated. If you try to perform such an action without having been recently authenticated, a 401 status is returned, listing flows that can be performed to reauthenticate. One such flow is the flow with ID reauthenticate, which allows for the user to input the password. This is the endpoint related towards that flow.

post/api/v2/allauth/app/v1/auth/reauthenticate

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

client'app' | 'browser' required

The type of client accessing the API.

Headers

X-Session-Tokenstring

Session token. Only needed when client is equal to app.

Request body

passwordstring required

The password.

Example request

{
  "password": "Alohomora!"
}

Response

Authenticated by password.

status200 required

Example response

{
  "data": {
    "user": {
      "id": 123,
      "display": "Magic Wizard",
      "email": "email@domain.org",
      "has_usable_password": true,
      "username": "wizard",
      "has_validated_password": true
    },
    "methods": [
      {
        "at": 1711555057.065702,
        "email": "email@domain.org",
        "username": "wizard"
      }
    ]
  },
  "meta": {
    "session_token": "ufwcig0zen9skyd545jc0fkq813ghar2",
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdW"
  }
}

Changes

    • info

      added the required property // to the response with the status