-
Notifications
You must be signed in to change notification settings - Fork 25
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
Handle invalid tokens on login #177
base: master
Are you sure you want to change the base?
Conversation
@gitmate-bot rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
01b6f61
to
2f31c80
Compare
Automated rebase with GitMate.io was successful! 🎉 |
@bhawesh96 , I have done a rebase using the bot; can you do a squash ? |
On it. |
2f31c80
to
cd1b558
Compare
I guess I messed up while squashing. I didn't really get what's happening here while rebasing and/or squashing :/ I just wanna keep this commit (cd1b558) in the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, you need to learn git a bit more...
On your local machine, drop those unrelated commits. Then do a rebase.
One quick way to fix: reset to the latest commit that in sync with master. Then add your changes again and commit.
Automated rebase with GitMate.io was successful! 🎉 |
@li-boxuan I guess the PR is good to be reviewed now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update your commit message to follow https://coala.io/commit
95c1279
to
ef62354
Compare
@gitmate-bot rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
ef62354
to
a7f237f
Compare
Automated rebase with GitMate.io was successful! 🎉 |
a7f237f
to
e9ae6cb
Compare
src/components/app/nav.jsx
Outdated
@@ -63,7 +63,9 @@ class AppNav extends Component { | |||
// } | |||
this.setState({info}); | |||
}).catch(() => { | |||
this.setState({info: null}); | |||
alert("Invalid user token"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid user token
-> GitHub token is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change the message. Though I wasn't sure if the way I have handled this issue is a good user experience or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works but is not ideal. Instead of an alert, I would be happier to see an error message displayed on the modal. Besides, the modal shouldn't be closed and then reopened.
Signout the user and show the login-modal if the token is invalid Closes coala#72
e9ae6cb
to
6c93fa3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more like a trick. It works but does not bring good user experience.
Instead of an alert, I would be happier to see an error message displayed on the modal. Besides, the modal shouldn't be closed and then reopened. (copied from #177 (comment))
When the token is invalid, sign-out the user and show login-modal again.
Fixes #72