Authentication
Login
Authenticate as a user.
Request Body
Email address of the user you're logging in as. for.
Password of the user.
Whether to retrieve the refresh token in the JSON response, or in a httpOnly
cookie.
The user's one-time-password (if MFA is enabled).
POST /auth/login
{
"data": {
"access_token": "eyJhbGciOiJI...",
"expires": 900,
"refresh_token": "yuOJkjdPXMd..."
}
}
Logout
Invalidate the refresh token thus destroying the user's session.
Request Body
The refresh token to invalidate. If you have the refresh token in a cookie through /auth/login, you don't have to submit it here.
Whether the refresh token is submitted in the JSON response, or in a httpOnly
cookie.
POST /auth/logout
List Auth Providers
List all the configured auth providers.
GET /auth/oauth
{
"data": [
"github",
"facebook"
]
}
Login Using an OAuth Provider
Start OAuth flow using the specified provider.
Query Parameters
Key of the activated OAuth provider.
Where to redirect on successful login.
If set the authentication details are set inside cookies otherwise a JSON is returned.
{
"data": {}
}
Request a Password Reset
Request a reset password email to be sent to the given user.
Request Body
Email address of the user you're requesting a reset for.
Provide a custom reset url which the link in the email will lead to. The reset token will be passed as a parameter. You need to configure the PASSWORD_RESET_URL_ALLOW_LIST
environment variable to enable this feature.
POST /auth/password/request
Reset a Password
The request a password reset endpoint sends an email with a link to the admin app which in turn uses this endpoint to allow the user to reset their password.
Request Body
One-time use JWT token that is used to verify the user, as provided in the email sent by the request endpoint.
New password for the user.
POST /auth/password/reset
Refresh Token
Retrieve a new access token using a refresh token.
Request Body
JWT access token you want to refresh. This token can't be expired.
Whether to submit and retrieve the refresh token in the JSON response, or in a httpOnly
cookie.
POST /auth/refresh
{
"data": {
"access_token": "eyJhbGciOiJI...",
"expires": 900,
"refresh_token": "Gy-caJMpmGTA..."
}
}