Reference for the ManaHalal authentication service
The ManaHalal Auth Service provides secure authentication for the ManaHalal ecosystem. It supports sign-in by email code, passkey and Google.
https://api.manahalal.com
All authenticated requests must include session cookies. The service uses HTTP-only cookies for session management.
Sign out the current user.
No request body required. Will clear the session cookie.
Get the current user's session information.
{
"session": {
"id": "session_123",
"userId": "user_123",
"expiresAt": "2024-01-22T10:00:00Z"
},
"user": {
"id": "user_123",
"email": "user@example.com",
"name": "John Doe",
"createdAt": "2024-01-15T10:00:00Z"
}
}
OAuth callback endpoint. Handled automatically by the OAuth flow.
Sessions are managed using HTTP-only cookies. The cookies are:
better-auth.session_token - Main session tokenThe API returns standard HTTP status codes and JSON error responses:
{
"error": "An unexpected error occurred. Please try again later.",
"code": "INTERNAL_ERROR"
}
| Status | Code | Description |
|---|---|---|
400 |
VALIDATION_ERROR | Invalid request data |
500 |
INTERNAL_ERROR | Server error |