1

I made a register form with a email address text field and such, so how do I verify that the email address belongs to the person. Could I make a code that is emailed to the user's email but how do I send emails in Xcode? Or is there some other way to do it with Firebase?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Kunal M
  • 47
  • 1
  • 5

1 Answers1

0

After you've created a user with their email and password, if there are no errors you send them a verification email.

import FirebaseAuth  

Auth.auth().currentUser?.sendEmailVerification
        {
            (error) in
            if error != nil
            {
                print(error!.localizedDescription)
                return
            }
            else
            {
                //CHECK INBOX FOR CONFIRMATION LINK
            }
        }
daj mi spokój
  • 248
  • 1
  • 2
  • 8