firebase / firebase/FirebaseUI-Android

[Auth-UI][v10.0.0-[beta05] SMS quota rejection maps to NetworkException, phone auth shows "check your internet connection" instead of "used too many times"

Đang mở
#2,513 2 bình luận 0 reaction 1 người được giao Được @demolaf nhận Xem trên GitHub
auth reproduced type: bug
Ngôn ngữ chính
Kotlin
Star
4.8k
Fork
1.9k
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
42

Mô tả

## Steps to reproduce

1. Request SMS verification repeatedly for one phone number until Firebase rejects it for quota.
2. Enter that number and tap send.

## Observed results:
「認証エラー / ネットワーク エラー。インターネット接続を確認してください。」 ( mean Please check your internet connection)
a network error, on a device with working connectivity. FirebaseUI iOS shows the correct 「この電話番号は何度も使用されています」(mean This phone number has been used too many times) for the same account state.

## Expected results:
`TooManyRequestsException`, whose dialog message resolves to `fui_error_too_many_attempts ` This is a string the library already ships translated in ja/ko/zh-rTW ("This phone number has been used too many times"). The correct copy exists and is simply unreachable.

## Root cause:
Firebase reports SMS-quota rejection as `FirebaseTooManyRequestsException`, which extends `FirebaseException` not`FirebaseAuthException`.
`AuthException.from` only checks the `ERROR_TOO_MANY_REQUESTS` error code inside the is `FirebaseAuthException` branch, so the quota exception falls through to the catch-all is `FirebaseException -> NetworkException. ErrorRecoveryDialog` then renders `fui_no_internet`.

Is this possible to add `FirebaseTooManyRequestsException -> TooManyRequestsException(...)` before the is FirebaseException branch to fix this issue ?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.