JohnTurkson / crypto-trading-platform

A simulated platform for trading and managing cryptocurrency portfolios. Built with React + Typescript, hosted and scaled on AWS (Lambda).
https://crypto.johnturkson.com
8 stars 3 forks source link

Frontend auth #37

Closed andykwan1124 closed 3 years ago

andykwan1124 commented 3 years ago

Recommended testing workflow:

  1. Try going to /overview or any of the protected routes, you should be redirected to sign-in page
  2. sign up for an account
  3. you should see a loading screen, that's the backend processing the request and sending back a token
  4. you should be sent to the /overview page. Going to any other protected routes should have no issues
  5. press logout, you should be redirected to sign-in page again
  6. sign-in with your credentials, you should be redirected to overview
  7. after signing in or signing up, trying to go back to /sign-in or /sign-up should redirect you back to overview
  8. You can also check the 'users' collection in mongoDB to see if a document of your newly created account is added there

I will not be dealing with auth errors in this PR. If your requests result in an error from the backend, you should be able to see it being console logged on the frontend (try supplying wrong password or signing up with an email that is already being used)