Dogacel / Kalas-Iris

Kalas-Iris CS491/2 Senior Design Project, Clothes recognition and rich attribute prediction using computer vision service for online clothing retail
GNU General Public License v3.0
8 stars 3 forks source link

Hook login/signup frontend with backend. #15

Closed Dogacel closed 3 years ago

AtaAtasoy commented 3 years ago

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(?) :)

AtaAtasoy commented 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.

Dogacel commented 3 years ago

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 👍

AtaAtasoy commented 3 years ago

There is already a PR in draft phase. I will open it for review and create another branch for this issue.