You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will provide an endpoint for only registered users to log in to their accounts. Users should be able to log in with with their usernames/emails and passwords.
This endpoint is expected to return an authentication token (JWT) with only the username encoded.
Endpoint:
POST /auth/signin
Response spec:
{
"token": "45erkjherht45495783" //JWT signed with only the username
}
Edge cases to keep in mind:
Only valid inputs should saved to the database. Validate/sanitize all user inputs
Responses should be sent with the appropriate status codes
Handle errors properly and return appropriate error messages like so:
{
"error": "appropriate error message"
}
The text was updated successfully, but these errors were encountered:
This will provide an endpoint for only registered users to log in to their accounts. Users should be able to log in with with their usernames/emails and passwords.
This endpoint is expected to return an authentication token (JWT) with only the username encoded.
Endpoint:
POST /auth/signin
Response spec:
Edge cases to keep in mind:
The text was updated successfully, but these errors were encountered: