0

I am developing with React x Firebase. I am checking the login user's email address authentication status with Firebase auth.

However, the value that can be obtained with "auth.currentUser.emailVerified" will not be updated unless the page is refreshed. How can I get the latest state without refreshing the page?

I've tried reload() , but when I run reload() right after login, I get an "auth/network-request-failed" error. Refresh your browser and the error should disappear.

Ika
  • 1,271
  • 1
  • 12
  • 20

1 Answers1

0

You can call reload() on the user object to get the latest state from the server.

Also see: user.emailVerified doesn't change after clicking email verification link firebase

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • thank you! I've tried reload() , but when I run reload() right after login, I get an "auth/network-request-failed" error. Refresh your browser and the error should disappear. – Ika Jul 06 '23 at 15:13