FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Incorrect password with FUIEmailAuth dismisses view instead of alerting user

Open PorterHoskins opened this issue 3 years ago • 0 comments

  • Objective C or Swift: Swift
  • iOS version: iOS 14.4
  • Firebase SDK version: 7.7.0
  • FirebaseUI version: 10.0.2
  • CocoaPods Version: 1.10.1

Describe the problem:

When the user enters an incorrect password in the pre-build FirebaseUI authentication with the FUIEmailAuth provider the view controller dismisses itself instead of prompting the user with an error and allowing the user to re-enter a password.

Steps to reproduce:

  1. Create a user with an email and password
  2. Sign out
  3. Enter the email for the previously created user
  4. Enter an incorrect password for the user

Observed Results:

The FUIAuthDelegate is notified with an error:

The password is invalid or the user does not have a password." UserInfo={NSLocalizedDescription=The password is invalid or the user does not have a password., FIRAuthErrorUserInfoNameKey=ERROR_WRONG_PASSWORD}

Getting the error could allow the developer to show an alert but it would do no good since the view controller dismisses itself.

Expected Results:

The pre-built UI should prompt the user about the incorrect credentials with a UIAlertController and should not dismiss itself. The FUIAuthDelegate could still be notified but it isn't necessary.

PorterHoskins avatar Mar 06 '21 02:03 PorterHoskins