Skip to content

Avoid rendering of unauthenticated content during authentication#24

Open
forste wants to merge 1 commit intoAnomalyInnovations:masterfrom
forste:patch-1
Open

Avoid rendering of unauthenticated content during authentication#24
forste wants to merge 1 commit intoAnomalyInnovations:masterfrom
forste:patch-1

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