Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User signin #2

Open
mazma1 opened this issue Jul 5, 2020 · 1 comment
Open

User signin #2

mazma1 opened this issue Jul 5, 2020 · 1 comment
Labels
beginner Good for beginners good first issue Good for newcomers intermediate Open to intermediates

Comments

@mazma1
Copy link
Collaborator

mazma1 commented Jul 5, 2020

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"
    }
    
@asi309
Copy link

asi309 commented Sep 17, 2020

Is this issue open? If yes I can contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Good for beginners good first issue Good for newcomers intermediate Open to intermediates
Projects
None yet
Development

No branches or pull requests

2 participants