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

Edge cases for /api/auth/* #35

Open
amy-lei opened this issue Jun 5, 2020 · 0 comments
Open

Edge cases for /api/auth/* #35

amy-lei opened this issue Jun 5, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@amy-lei
Copy link
Member

amy-lei commented Jun 5, 2020

For /api/auth/register

  • Check if the username already exists in the DB, otherwise therell be an internal server error
  • Return the

For /api/auth/login

  • Check if the username is valid before checking the password (because user.check_password(body.get('password')) results in an error if user does not exist)
  • Along with the token, return the user's id, the user's list of contacts and the user's list of groups.
@amy-lei amy-lei added the bug Something isn't working label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants