Skip to content

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

@n8ebel

Description

@n8ebel

Step 1: Are you in the right place?

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

Step 2: Describe your environment

  • Android device: Pixel 2 XL
  • Android OS version: 11
  • Google Play Services version: 21.21.16
  • FirebaseUI version: 7.2

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:

  • After cancelling the dialog without clicking Dismiss, the UI is left with an empty, transparent Activity.
  • At this point, no Activity Result will have been returned to the Activity that started the EmailLinkCatcherActivity

Expected Results:

  • I would expect cancelling the dialog, in any way, to return an Activity Result and to finish the activity so we are not left with an empty UI that obsures our own UI
  • Making the error dialog non-cancellable thereby forcing the use of Dismiss, or adding a onCancel listener and finishing the Activity in onDismiss would be an improvement

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions