Implement POST request on /login #2

Closed
opened 2026-02-25 06:56:40 +00:00 by charlie · 0 comments
Owner

Create a POST endpoint for /login

Request

The Request body should look like the following

{
  email: string,
  pass: string
}

Response

Success

  • If the user exist and the password is correct the Response must have status code 200 and include a payload following this model
{
  jwt: string,
  rtoken: string
}

Failure

  • If the user does not exist or the password is incorrect the Response must return status code 401 and include this payload:
{
  message: Invalid credential
}
  • If the Request is malformed the Response must return status code 400 and include this payload:
{
  message: Request malformed
}
# Create a POST endpoint for /login ## Request The Request body should look like the following ``` { email: string, pass: string } ``` ## Response ### Success - If the user exist and the password is correct the Response must have status code 200 and include a payload following this model ```json { jwt: string, rtoken: string } ``` ### Failure - If the user does not exist or the password is incorrect the Response must return status code 401 and include this payload: ```json { message: Invalid credential } ``` - If the Request is malformed the Response must return status code 400 and include this payload: ```json { message: Request malformed } ```
charlie self-assigned this 2026-02-25 06:56:40 +00:00
charlie added this to the Working AUTH milestone 2026-02-26 10:48:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ULFSII/phoenix_api#2
No description provided.