User login
POST
/v1/auth/login
const url = 'https://api.neuramancer.dev/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'},};
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://api.neuramancer.dev/v1/auth/login \ --header 'Content-Type: application/json' \Authenticates a user with email and password via Firebase, creates a custom token with enriched claims, and returns session tokens. No middleware authentication required.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
User’s email address
string format: email
password
required
User’s password
string
Examplegenerated
{ "password": "example"}Responses
Section titled “Responses”Login successful
Media typeapplication/json
Standardized success response containing session tokens, following the APIResponse
object
success
required
boolean
data
required
object
customIdToken
required
Custom Firebase ID token for authenticated requests
string
customRefreshToken
required
Refresh token to obtain new session tokens
string
tosAccepted
required
Whether the user has accepted the terms of service
boolean
Example
{ "success": true}Missing email or password
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}Invalid credentials or authentication failure
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}