serverless-stack-demo-client icon indicating copy to clipboard operation
serverless-stack-demo-client copied to clipboard

Avoid rendering of unauthenticated content during authentication

Open forste opened this issue 7 years ago • 1 comments

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

forste avatar Feb 07 '18 16:02 forste

@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?

jayair avatar Feb 07 '18 19:02 jayair