Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[firebase_ui_auth] - exception is only throw one time when using startMFAVerification

Open
#481 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
dart, firebase, flutter

Research direction

Start at the firebase_ui_auth implementation of startMFAVerification and compare its handling of the shown provider.sendVerificationCode call after an invalid code. Reproduce the flow with AuthStateChangeAction and verify that repeated validation errors reach the surrounding FirebaseException catch, not only the first attempt.

Written by the indexing model from the issue text.

Description

Keep Open Needs Attention
Is there an existing issue for this?
  • I have searched the existing issues and found no duplicates.
What plugin is this bug for?

Firebase UI Auth

What platform(s) does this bug affect?

Web

List of dependencies used.
flutter pub deps -s list
  
Steps to reproduce

if you have this in your actions:

AuthStateChangeAction<MFARequired>((context, state) async {
     try {
        await startMFAVerification(
          resolver: state.resolver,
          context: context,
        );
      } on FirebaseException catch (e) {
        if (!context.mounted) return;
        ScaffoldMessenger.of(context).hideCurrentSnackBar();
        ScaffoldMessenger.of(context).showSnackBar(
          SnackBar(
            content: ErrorText(exception: e),
          ),
        );
      }
}),

The Exception only only catch the first time as you can see it:

Image

If you press a second time on the validation button

Image

The Exception is not raised to the previous catch statement....but print to the console

Image

Expected Behavior

The the error as many time needed.

One you have an error, In was expecting form this helper method to restart:

  provider.sendVerificationCode(
      hint: hint as fba.PhoneMultiFactorInfo,
      multiFactorSession: session,
      action: AuthAction.none,
    );

Otherwise once you have an error, you need to go to the previous page and type correctly the pin.
I'm expecting user to sometime do mistakes when entering the code, so this can be very annoying from an end user perspective.

Actual Behavior

Only trigger one time

Additional Information

No response

Dominant language
Dart
Stars
152
Forks
141
Avg merge
2d 12h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/FirebaseUI-Flutter

All issues in firebase/FirebaseUI-Flutter

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.