0

I'm trying to save user data in firestore when the email is verified, which is the best practice I guess.

I already did everything but I don't know how to save my user to a user collection when the email is verified.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Mohammed Malek
  • 164
  • 1
  • 9
  • 1
    I'm not sure I understand the problem: did you try to detect in your code that the email is verified, and then write that information to Firebase? – Frank van Puffelen Mar 14 '23 at 00:24
  • YES, the problem is that I don't have a verification page, when the user clicks login or signup it sends an email immediately when the user clicks on the link how am I going to save user info according to this event? – Mohammed Malek Mar 14 '23 at 01:27
  • 1
    There is no notification action to your Flutter code when the user clicks the email link, since that verification happens elsewhere (either in their email client or in a browser popped up from there). You could implement a server-side check like shown here: https://stackoverflow.com/questions/67827663/let-user-know-when-email-verified or a client-side check as shown here: https://stackoverflow.com/questions/57192651/, here: https://stackoverflow.com/a/73068181, here: https://stackoverflow.com/a/63258198 – Frank van Puffelen Mar 14 '23 at 01:55

0 Answers0