Open marcusx2 opened 8 months ago
One might think this is not a big deal, but I thought user.reload was simply not working on the emulator after I verified that it works without emulator and wasted a lot of time. If this is not considered a big deal at least I'll leave it documented here.
Thanks for filing this. Since this issue only happens when using the emulator, I'm going to move this issue to firebase-tools GitHub repository in hopes you can get better support.
Hey @marcusx2, does this issue still occur if you add a call to user = await auth.currentUser();
? ie
if (user?.emailVerified) {
console.log('email verified');
} else {
console.log('email not verified');
user?.reload();
user = auth.currentUser()
}
Based on https://stackoverflow.com/questions/51709733/what-use-case-has-the-reload-function-of-a-firebaseuser-in-flutter, it seems like this is a necessary step.
I didn't try that, but it's not a necessary step without the emulator.
Operating System
macOS
Browser Version
Safari 16.5.2
Firebase SDK Version
10.7.1
Firebase SDK Product:
Auth
Describe your project's tooling
index.html with source tag. Just javascript.
Describe the problem
emailVerified never returns true when using the emulator after a user.reload and the emailVerified is set to true manually from the console instead of using sendEmailVerification.
I mean to set the emailVerified to true here
after creating the user with email and password, instead of sending an email verification with code.
Steps and code to reproduce issue