Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear Stale GitHub Token from cache #654

Open
Schwartz10 opened this issue Mar 27, 2019 · 5 comments · May be fixed by #1849
Open

Clear Stale GitHub Token from cache #654

Schwartz10 opened this issue Mar 27, 2019 · 5 comments · May be fixed by #1849
Assignees
Labels
Milestone

Comments

@Schwartz10
Copy link
Collaborator

Schwartz10 commented Mar 27, 2019

Yalda Update: Can someone try to test & reproduce this. If not reproducible then close it.

  1. sign in with github
  2. revoke access to github (from github)
  3. refresh the projects app

The app is using a stale github token, so we get a bunch of errors when trying to fetch repos and issues

The app needs to handle a 403 error (or whatever it comes back as) from github and clear the aragon cache's github token

@javieralaves
Copy link
Collaborator

@Schwartz10 Is this issue related to what just happened to me here? I revoked GitHub, refreshed the app, and it basically became unusable until I cleared the cache.

Screenshot 2019-11-18 at 11 31 48

Screenshot 2019-11-18 at 11 32 21

@Schwartz10
Copy link
Collaborator Author

@jayalaves it's been a while since I was in this part of the code, but it smells like the same issue. The app should remove the token from cache automatically if it attempts to log in to your github and comes back with a 401 or 403 presumably. What's your network tab say?

@stellarmagnet stellarmagnet added this to the Sprint B2 milestone Dec 4, 2019
@e18r e18r self-assigned this Dec 10, 2019
@e18r
Copy link
Contributor

e18r commented Dec 10, 2019

I was able to reproduce this by following @Schwartz10's instructions.
Screenshot from 2019-12-10 12-39-00

The Projects app becomes unusable until you clear cache, after which the user is logged out.
Screenshot from 2019-12-10 12-43-47

@javieralaves What should happen in this scenario? I suppose simply log the user out immediately? Maybe an error message?

@Quazia Quazia modified the milestones: Sprint B2, Sprint B3 Dec 11, 2019
@rkzel
Copy link
Collaborator

rkzel commented Dec 12, 2019

Ok. There are actually several places that need checking - each time a GH query errors out with networkError 401 we need to show a 'log in again' button with appropriate message, like "you have been kicked out of GH, please log ing again". Places:

  1. Overview tab, adding new Project,
  2. Issues, any interaction within,
  3. IssueDetails.

I tried clearing token, but by itself it does cause positive UI interaction - what happens instead is that the error is still displayed. So, I can make the error look like information and button to re-login:

Screenshot from 2019-12-12 16-20-13

@javieralaves when you have a spare moment... :)

@javieralaves
Copy link
Collaborator

@rkzel @e18r Let's go with this?

D 5 0 – Kicked out

@e18r e18r linked a pull request Jan 7, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants