I updated an angular app from firebase.js version 8 to 9 and i'm struggling with an issue when verifying the user's email.
A custom email verification link is generated and sended to the user's email. Then, when the user access the link i apply the oobCode with the following code.
public async verifyEmail(actionCode: string): Promise<void> {
await applyActionCode(this.firebaseAuth, actionCode);
console.log(await this.firebaseAuth.currentUser);
}
}
The problem is that, after aplying the action code, in the console the currentUser.emailVerified == false.
To get the user to have the emailVerified == true i have to logout and login again.
After refreshing the token with getIdTokenResult(this.firebaseAuth.currentUser, true) emailVerified is still false.
Here is the firebase initialization
this.firebaseApp = initializeApp(config);
this.firebaseAuth = getAuth(this.firebaseApp);
I found this issue that is similar https://github.com/invertase/react-native-firebase/issues/3597 but it didn't help.
Is this a normal behavior in version 9?