After registering in my web app, i redirect the user to a page, where he is told to verify his email. Once he has done that, i want to automatically detect the change of the verificationStatus and then change the page. Something along those lines.
auth.user.subscribe(user => {
if (!!user && user.emailVerified === true) {
this.redirectToLogin();
}
});
I couldn't find any way to detect changes of the emailVerified status, so I thought, maybe have an interval runnning that is updating the user data every now and then, but I couldn't find a way how to refresh the user data from firebase authentication.
Is there a way to update the user data without reloading/refreshing the page? Do i have to refresh the authState? If possible, how can i do that?
Is what I want to do, even possible?