Skip to main content
Directus supports multiple authentication methods to suit different use cases.

Public Data

Some data may be accessible without authentication if the Public role has permissions configured.

Temporary Token (JWT)

Login with email and password to receive a temporary access token and refresh token.

Login

string
required
User’s email address
string
required
User’s password
Response:

Using the Token

Include the access token in the Authorization header:

Refresh Token

Access tokens expire after 15 minutes by default. Use the refresh token to get a new access token:

Logout

Invalidate the refresh token:

Static Token

For server-to-server communication, use a static token. Create one in Settings > Access Tokens.
Static tokens never expire. Store them securely and never expose them in client-side code.

SSO Authentication

Directus supports external authentication providers:

OAuth 2.0

OpenID Connect

LDAP

SAML

See the Authentication Features guide for SSO configuration.

Password Reset

Request Password Reset

Reset Password

Two-Factor Authentication

Enable TFA for additional security. After login, provide the OTP code:
For browser-based applications, use cookie sessions:
Login returns a cookie that’s automatically sent with subsequent requests.

Error Codes

error
Email or password is incorrect
error
Access token is invalid or expired
error
Two-factor authentication code is incorrect
error
User account has been suspended

Next Steps

Items API

Work with collection items

Users API

Manage users