firebase / FirebaseUI-Android

Optimized UI components for Firebase
https://firebaseopensource.com/projects/firebase/firebaseui-android/
Apache License 2.0
4.63k stars 1.84k forks source link

Cancelling error dialog of EmailLinkCatcherActivity does not finish or send Activity result #1972

Open n8ebel opened 3 years ago

n8ebel commented 3 years ago

Step 1: Are you in the right place?

Yes. Issue is related to the code in this repo.

Step 2: Describe your environment

Step 3: Describe the problem:

During email-link verification, if a user clicks a an email link that is invalid, an error dialog is shown. Clicking Dismiss will finish the Activity and send a result back to whichever Activity started it.

However, dismissing the AlertDialog does not. It leaves the user on a blank Activity screen and requires clicking the back button to clear EmailLinkCatcherActivity

Steps to reproduce:

  1. Trigger an email-link auth email to be sent to your email
  2. Invalidate the link be either letting it expire or by handling it once
  3. Click on the email link and properly handle it in the app to the point of seeing the error message The action code is invalid. This can happen if the code is malformed, expired or has already been used.
  4. Instead of clicking the Dismiss button, cancel the dialog by tapping outside of it

Observed Results:

Expected Results:

Relevant Code:

Updating the Dialog configuration in these lines looks like it would address the issue:

https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java#L118-L126

samtstern commented 3 years ago

@n8ebel thanks for the specific and detailed report!