Closed Dogacel closed 3 years ago
I think we can add a /getCurrentUser endpoint to the backend, which would be used to access the username, access_token and refresh_token of the current user in the session. The request would be sent after the login function, which creates a session for the logged in user in the backend. We could display an error message on the frontend if the /getCurrentUser endpoint returns nothing it means that the authentication process failed, else we can use the result we get from /getCurrentUser to set the state of our React application. Waiting on your feedback before implementation.
I think you need another branch. But this is blocked so don't worry about it until other branches get merged. After backend and frontend branches get merge, we can remove the blocked tag and start a new branch. A login/signup page without functionality is not going to hurt anyone in the main branch.
Everything else LGTM 👍
There is already a PR in draft phase. I will open it for review and create another branch for this issue.
Should we create another branch for this issue ? I think we can continue on the login_signup_frotend branch but it is also getting pretty long, plus, creating a branch for each issue might be more classy(?) :)