Firebase Authentication のユーザーのメールアドレスを更新する方法として、
「新しいメールアドレスに認証メールが送られ、リンクがクリックされると更新される」関数があります。
// newEmail に確認メールが送信されます。メールのリンクをクリックすると newEmail に変更されます。
Auth.auth().currentUser?.sendEmailVerification(beforeUpdatingEmail: newEmail) { error in
// ...
}
ちなみに、以下のコードだとメール認証なしで変更されます。
Auth.auth().currentUser?.updateEmail(to: email) { error in
// ...
}
追記(2021/12/12)
エミュレータを使用中は、sendEmailVerification(beforeUpdatingEmail:)
をすると内部エラーが返ってくるみたいです。