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

Avoid rendering of unauthenticated content during authentication #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

forste
Copy link

@forste forste commented Feb 7, 2018

this.setState({ isAuthenticating: false }); is called before this.userHasAuthenticated(true); finishes, which causes rendering unauthenticated content

`this.setState({ isAuthenticating: false });` is called before `this.userHasAuthenticated(true);` finishes
@jayair
Copy link
Member

jayair commented Feb 7, 2018

@forste I don't think this change would work. The await is on the function userHasAuthenticated that does not return anything.

Both userHasAuthenticated and the this.setState({ isAuthenticating: false }) should get batched together. So you shouldn't have a case where the unauthenticated content is getting rendered.

Are you seeing otherwise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants