Log in with local credentials
POST
/auth/local/login
const url = 'https://example.com/v1/auth/local/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/auth/local/login \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
password
required
string format: password
Example generated
{ "email": "hello@example.com", "password": "example"}Responses
Section titled “Responses”Authenticated; returns a JWT and sets a refresh cookie
Media typeapplication/json
object
token
string
user
object
id
string format: uuid
email
string format: email
name
string
role
string
active
boolean
Example
{ "user": { "role": "user" }}Invalid credentials