Skip to content

User signin #2

@mazma1

Description

@mazma1

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"
    }
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions