0

so I have a button, and when it is pressed then the codes below will be executed

    var firebaseUser = Auth.auth().currentUser!
    if !firebaseUser.isEmailVerified {
        showAlert(alertMessage: "please open and verify your email first.")
        return
    }

1) the user click the button, and the alert is shown because this user is not yet verified.

2) and then, when the app is running, he opens the email and verify it

3) he backs to the app, and hit that button again. but the alert is still appeared and say that he has not been verified. even though he actually has been verified.

I assume I don't get the latest currentUser data from firebase authentication. so what should I do to get the latest firebase user data from authentication ?

Alexa289
  • 8,089
  • 10
  • 74
  • 178
  • exact same use case. have you found any solution? not `firebase function` or `re-login` at least? – Deepak Sharma Dec 22 '20 at 17:15
  • hi I found the answer here - https://stackoverflow.com/questions/41874910/can-i-get-updated-emailverified-without-logging-out we need to call the `reload()` method on `currentUser` – Deepak Sharma Dec 22 '20 at 17:48

0 Answers0