Auth | Customer Login
http://localhost:4000/api/auth/customers/login
Parameter
| Field | Type | Description |
|---|---|---|
| String |
Customer email |
|
| password | String |
Customer password |
{
"email": "suzi@test.ts"t,
"password":"pass"
}
Success 200
| Field | Type | Description |
|---|---|---|
| message | String |
Welcome message |
| token | String |
Authorization token |
HTTP/1.1 200 Success
{
"message": "Welcome back Suzi",
"token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJuYW1lIjoiU3V6aSBMb2FkIiwicm9sZSI6I"
}
Auth-Error
| Name | Type | Description |
|---|---|---|
| UserNotFound | String |
User not found |
| BadRequest | json |
Missing params |
HTTP 1.1 404 Not Found
"User was not found, please register"
HTTP 1.1 400 Not Found
{
errorMessage: "Username or Password missing, please make sure to add username and password"
}