Handle invalid tokens on login#177
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 |
li-boxuan
left a comment
There was a problem hiding this comment.
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! |
jayvdb
left a comment
There was a problem hiding this comment.
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
| this.setState({info}); | ||
| }).catch(() => { | ||
| this.setState({info: null}); | ||
| alert("Invalid user token"); |
There was a problem hiding this comment.
Invalid user token -> GitHub token is invalid.
There was a problem hiding this comment.
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.
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
li-boxuan
left a comment
There was a problem hiding this comment.
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