react-auth-app-example icon indicating copy to clipboard operation
react-auth-app-example copied to clipboard

Prevent ComposedComponent from appearing before redirect

Open pulsecat opened this issue 9 years ago • 3 comments

There is a security issue when ComposedComponent appears for a second before redirect when the user is unauthenticated.

pulsecat avatar Feb 17 '17 16:02 pulsecat

Hi @pulsecat. Thanks for your contribution.

Can you show some test cases for this? This should not happen because componentWillMount() and componentWillUpdate() are invoked immediately before rendering.

jferrettiboke avatar Feb 17 '17 17:02 jferrettiboke

hi @jferrettiboke,

It is what I observed on the client side. My React expertise isn't really good but I suspect that this.context.router.push('/') does not have immediate effect and the subsequent render occurred anyway.

pulsecat avatar Feb 17 '17 18:02 pulsecat

I didn't see anything that you mentioned. Can you explain me your use case exactly?

jferrettiboke avatar Feb 17 '17 19:02 jferrettiboke