0

Basically i setup an auth process via email and password with firebase. The user, however, has only access to the app with a verified email. Until the mail is verified, he sees a screen telling him to do so.

There is:

handle = Auth.auth().addStateDidChangeListener { auth, user in
  // ...
}

which is:

"the recommended way to get the current user"

Sadly this listener does not react to any mail specific actions. This makes me wonder, do i have to constantly call user.refresh() ?

Also: after some research i found this, but could not find an iOS specific function ... if it even exists ?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
lr058
  • 273
  • 2
  • 11

1 Answers1

0

do i have to manually call user.refresh()?

Yes. Since verifying the user's email address happens outside of your application, the user's profile in your app doesn't automatically get updated. You'll have to wait until the token auto-refreshes (which happens hourly), or you'll have to either explicitly request an update.

Also see:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807