firebase / firebase/FirebaseUI-Flutter
[firebase_ui_auth] - exception is only throw one time when using startMFAVerification
- Ngôn ngữ chính
- Dart
- Star
- 151
- Fork
- 141
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 6
Mô tả
### Is there an existing issue for this?
- [x] 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((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:

If you press a second time on the validation button

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

### 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_
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ phần triển khai startMFAVerification của firebase_ui_auth và so sánh cách xử lý lời gọi provider.sendVerificationCode được hiển thị sau khi nhập mã không hợp lệ. Tái hiện luồng với AuthStateChangeAction và xác minh rằng các lỗi xác thực lặp lại đi đến catch FirebaseException bao quanh, không chỉ lần thử đầu tiên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- dart, firebase, flutter
- Lĩnh vực
- authentication, web-dev
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100