unitaryfund / metriq-app

Web app for Metriq
https://metriq.info
Apache License 2.0
27 stars 19 forks source link

As an anonymous user, I want to log in, so I can access authenticated member functionality. (Web app <-> REST API) #18

Closed WrathfulSpatula closed 3 years ago

WrathfulSpatula commented 3 years ago
User (Web App) System (REST API)
1. Submit request to:
    POST ./api/login
1.
2. 2. Find normalized user name in DB
3. 3. Not found - return HTTP 400, with error message (OR 5.)
4. Show response message to user 4.
5. 5. OR user found
6. 6. Hash password from request and compare hash to DB document with username
7. 7. Doesn't match - return HTTP 400, with error message (OR 9.)
8. Show response message to user 8.
9. 9. OR password hashes match - return HTTP 200 with JWT.
10. (User is authenticated) 10. (Returned JWT)
vprusso commented 3 years ago

Based on:

I believe this user story can be closed.