I have a check for email(backend java), and component which displays whether the user has confirmed mail or not, only text confirmed or no.
And I want to force user with not verified email verify email first before using private routes, or any backend features that require authorization.
But i understand where should i add a check like this. I would like this to work at the level of the whole applicationю
My stack react, redux, saga
I would be very grateful for your advice
I tried add to private route this:
if (props.state.profile.emailVerified) {
return (
<Redirect
to={{ pathname: '/activate', state: { from: props.location } }}
/>
);
}
but its not work for me