qiusuo-fuyuan / qiusuo-frontend

0 stars 0 forks source link

GitHub Login #36

Open ryan-zheng-teki opened 4 years ago

ryan-zheng-teki commented 4 years ago

Acceptance Criteria TS: 24h

User is able to log in using his Github account from the UI sequence diagram: https://app.diagrams.net/#G1SBm-5ixhr9MtxOIx1ezr5akm99zmZAsu

ryan-zheng-teki commented 4 years ago

When the backend sends the JwtToken back to frontend, the token is stored in localStorage. Whenever any request is sent to backend, this token will be sent together in the Http request. When the user logs out, we should remove the token from the localStorage

ryan-zheng-teki commented 4 years ago

Github Login Error Handling (1)backend returns error for getting access token (2)graphql returns error from backend

Error handling for each promise should be correctly described in Javascript When getting accessToken i didn't handle the error. AccessToken request actually failed. But later, UserDetails is sent as well.