Skip to content

Handle invalid tokens on login#177

Open
bhawesh96 wants to merge 1 commit into
coala:masterfrom
bhawesh96:token-validation
Open

Handle invalid tokens on login#177
bhawesh96 wants to merge 1 commit into
coala:masterfrom
bhawesh96:token-validation

Conversation

@bhawesh96

Copy link
Copy Markdown
Member

When the token is invalid, sign-out the user and show login-modal again.
Fixes #72

@jayvdb

jayvdb commented Oct 31, 2018

Copy link
Copy Markdown
Member

@gitmate-bot rebase

@gitmate-bot

Copy link
Copy Markdown

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 ⚠️

@gitmate-bot

Copy link
Copy Markdown

Automated rebase with GitMate.io was successful! 🎉

@jayvdb

jayvdb commented Oct 31, 2018

Copy link
Copy Markdown
Member

@bhawesh96 , I have done a rebase using the bot; can you do a squash ?

@bhawesh96

Copy link
Copy Markdown
Member Author

On it.

@bhawesh96

bhawesh96 commented Oct 31, 2018

Copy link
Copy Markdown
Member Author

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 li-boxuan left a comment

Copy link
Copy Markdown
Member

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.

@gitmate-bot

Copy link
Copy Markdown

Automated rebase with GitMate.io was successful! 🎉

@bhawesh96

Copy link
Copy Markdown
Member Author

@li-boxuan I guess the PR is good to be reviewed now!

@jayvdb jayvdb left a comment

Copy link
Copy Markdown
Member

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

@bhawesh96

Copy link
Copy Markdown
Member Author

@gitmate-bot rebase

@gitmate-bot

Copy link
Copy Markdown

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 ⚠️

@gitmate-bot

Copy link
Copy Markdown

Automated rebase with GitMate.io was successful! 🎉

Comment thread src/components/app/nav.jsx Outdated
this.setState({info});
}).catch(() => {
this.setState({info: null});
alert("Invalid user token");

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

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

@li-boxuan li-boxuan left a comment

Copy link
Copy Markdown
Member

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants