ae-andre / insights-bench

An online community of conversation, built with the MERN stack, that will allow those with personal, financial or career-related problems to talk them through with others, in either a private or a public channel.
MIT License
0 stars 3 forks source link

Login page user-flow Attn JASMINE #58

Open kwubbenhorst opened 8 months ago

kwubbenhorst commented 8 months ago
  1. When I arrive at the login page through either a redirect from having tried to +New Public Conversation or +Comment on a public conversation, or by clicking the Nav link, I am presented with input fields for my username and password, a submit button and a link to go to signup instead. (DONE (components by JL, routing by KW))
  2. When I click the link to signup instead I am taken to the Role page where I choose to signup either as a listener or a sharer (DONE (components by JL, routing by KW))
  3. When click on the Listener button I am taken to the ListenerSignup, and when I click on the Sharer button I am taken to the SharerSignup (components by JL, routing by KW))
  4. Upon button click from the Login version of the page, I am told that my login is successful and am redirected (currently) to the Home page. Behind this lies the authentication logic which creates a JWtoken and stores it in local storage for 2 hours. It is included in the headers of all queries and mutations for protected routes thereafter. (DONE by Tiffany) COMMENT by Karla "Great job on the JWT integration!! I would suggest displaying the successful login validation for a bit longer and instead of redirect to Home, either redirect to MyBench or leave user the choice of where they want to go: Home (public pavilion) or MyBench (private bench).
  5. ADD USER. Login works with usernames and passwords from the seeds. If we want to signup a new user we will need to use the addUser mutation. Bind a handler function to the submit buttons on the ListenerSignup and SharerSignup, capture role value depending on which button has been clicked, to send this with payload to backend where resolver does database update. Validation notice sent back to user at the front end "Nice to have you at Soul Bench" Buttons for user to choose where they want to be redirected: either to MyBench or Homepage (pavilion). (NOT DONE -- BEING WORKED ON BY JASMINE). THIS EXHAUSTS ALL USERFLOW SCENARIOS INVOLVING THE LOG-IN PAGE.