firebase / FirebaseUI-Flutter

Apache License 2.0
92 stars 79 forks source link

🐛 Unhandled exception when logging in with deleted user credentials #226

Closed alxkzmn closed 6 months ago

alxkzmn commented 6 months ago

Is there an existing issue for this?

What plugin is this bug for?

Firebase UI Auth

What platform(s) does this bug affect?

iOS

List of dependencies used.

flutter pub deps -s list ``` - flutter 0.0.0 - characters 1.3.0 - collection 1.18.0 - material_color_utilities 0.5.0 - meta 1.10.0 - vector_math 2.1.4 - web 0.3.0 - sky_engine any - enum_to_string 2.0.1 - equatable 2.0.5 - collection ^1.15.0 - meta ^1.3.0 - flutter_hooks 0.20.3 - flutter any - hooks_riverpod 2.4.9 - collection ^1.15.0 - flutter any - flutter_hooks >=0.18.0 <0.21.0 - flutter_riverpod 2.4.9 - riverpod 2.4.9 - state_notifier >=0.7.2 <2.0.0 - riverpod_annotation 2.3.3 - meta ^1.7.0 - riverpod ^2.4.9 - html_character_entities 1.0.0+1 - meta 1.10.0 - json_annotation 4.8.1 - meta ^1.4.0 - json_serializable 6.7.1 - analyzer >=5.12.0 <7.0.0 - async ^2.8.0 - build ^2.0.0 - build_config >=0.4.4 <2.0.0 - collection ^1.14.0 - json_annotation >=4.8.1 <4.9.0 - meta ^1.3.0 - path ^1.8.0 - pub_semver ^2.0.0 - pubspec_parse ^1.0.0 - source_gen ^1.3.2 - source_helper ^1.3.0 - sqflite 2.3.0 - flutter any - sqflite_common >=2.5.0-1 <4.0.0 - path >=1.8.0 <3.0.0 - firebase_core 2.24.2 - firebase_core_platform_interface ^5.0.0 - firebase_core_web ^2.10.0 - flutter any - meta ^1.8.0 - cloud_firestore 4.13.6 - cloud_firestore_platform_interface ^6.0.10 - cloud_firestore_web ^3.8.10 - collection ^1.0.0 - firebase_core ^2.24.2 - firebase_core_platform_interface ^5.0.0 - flutter any - meta ^1.8.0 - uuid 4.2.2 - crypto ^3.0.0 - sprintf ^7.0.0 - meta ^1.9.1 - google_cloud_translation 0.0.3 - flutter any - http ^1.1.2 - html_unescape ^2.0.0 - csv 5.1.1 - firebase_auth 4.15.3 - firebase_auth_platform_interface ^7.0.9 - firebase_auth_web ^5.8.12 - firebase_core ^2.24.2 - firebase_core_platform_interface ^5.0.0 - flutter any - meta ^1.8.0 - firebase_dynamic_links 5.4.8 - firebase_core ^2.24.2 - firebase_core_platform_interface ^5.0.0 - firebase_dynamic_links_platform_interface ^0.2.6+16 - flutter any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - go_router 13.0.0 - collection ^1.15.0 - flutter any - flutter_web_plugins any - logging ^1.0.0 - meta ^1.7.0 - flutter_dotenv 5.1.0 - flutter any - google_mobile_ads 4.0.0 - meta ^1.0.4 - flutter any - webview_flutter_android ^3.3.1 - webview_flutter_wkwebview ^3.1.1 - webview_flutter ^4.0.5 - firebase_analytics 10.7.4 - firebase_analytics_platform_interface ^3.8.4 - firebase_analytics_web ^0.5.5+11 - firebase_core ^2.24.2 - firebase_core_platform_interface ^5.0.0 - flutter any - purchases_flutter 6.5.1 - flutter any - freezed_annotation ^2.0.1 - json_annotation ^4.8.0 - text_to_speech 0.2.3 - flutter any - flutter_web_plugins any - text_to_speech_macos ^0.1.1 - text_to_speech_platform_interface ^0.1.3 - text_to_speech_web ^0.1.2 - babstrap_settings_screen 0.1.6 - flutter any - progress_loading_button 2.0.2 - flutter any - firebase_ui_auth 1.11.0 - email_validator ^2.1.17 - firebase_auth ^4.15.0 - firebase_core ^2.24.0 - firebase_dynamic_links ^5.4.6 - firebase_ui_localizations ^1.9.0 - firebase_ui_oauth ^1.4.15 - firebase_ui_shared ^1.4.1 - flutter any - flutter_localizations any - meta ^1.10.0 dev dependencies: - build_runner 2.4.7 - analyzer >=4.4.0 <7.0.0 - args ^2.0.0 - async ^2.5.0 - build >=2.1.0 <2.5.0 - build_config >=1.1.0 <1.2.0 - build_daemon ^4.0.0 - build_resolvers ^2.0.0 - build_runner_core ^7.2.0 - code_builder ^4.2.0 - collection ^1.15.0 - crypto ^3.0.0 - dart_style ^2.0.0 - frontend_server_client ^3.0.0 - glob ^2.0.0 - graphs ^2.2.0 - http_multi_server ^3.0.0 - io ^1.0.0 - js ^0.6.3 - logging ^1.0.0 - meta ^1.3.0 - mime ^1.0.0 - package_config ^2.0.0 - path ^1.8.0 - pool ^1.5.0 - pub_semver ^2.0.0 - pubspec_parse ^1.0.0 - shelf ^1.0.0 - shelf_web_socket ^1.0.0 - stack_trace ^1.10.0 - stream_transform ^2.0.0 - timing ^1.0.0 - watcher ^1.0.0 - web_socket_channel ^2.0.0 - yaml ^3.0.0 - riverpod_generator 2.3.9 - analyzer >=5.12.0 <7.0.0 - build ^2.0.0 - build_config ^1.0.0 - collection ^1.15.0 - crypto ^3.0.2 - meta ^1.7.0 - path ^1.8.0 - riverpod_analyzer_utils ^0.5.0 - riverpod_annotation ^2.3.3 - source_gen ^1.2.0 - flutter_test 0.0.0 - flutter any - test_api 0.6.1 - matcher 0.12.16 - path 1.8.3 - fake_async 1.3.1 - clock 1.1.1 - stack_trace 1.11.1 - vector_math 2.1.4 - async 2.11.0 - boolean_selector 2.1.1 - characters 1.3.0 - collection 1.18.0 - material_color_utilities 0.5.0 - meta 1.10.0 - source_span 1.10.0 - stream_channel 2.1.2 - string_scanner 1.2.0 - term_glyph 1.2.1 - web 0.3.0 transitive dependencies: - _fe_analyzer_shared 64.0.0 - meta ^1.9.0 - _flutterfire_internals 1.3.16 - collection ^1.0.0 - firebase_core ^2.24.2 - firebase_core_platform_interface ^5.0.0 - flutter any - meta ^1.8.0 - analyzer 6.2.0 - _fe_analyzer_shared ^64.0.0 - collection ^1.17.0 - convert ^3.0.0 - crypto ^3.0.0 - glob ^2.0.0 - meta ^1.7.0 - package_config ^2.0.0 - path ^1.8.0 - pub_semver ^2.0.0 - source_span ^1.8.0 - watcher ^1.0.0 - yaml ^3.0.0 - analyzer_plugin 0.11.3 - analyzer ^6.0.0 - collection ^1.15.0 - dart_style ^2.2.1 - pub_semver ^2.1.0 - yaml ^3.1.0 - args 2.4.2 - async 2.11.0 - collection ^1.15.0 - meta ^1.1.7 - boolean_selector 2.1.1 - source_span ^1.8.0 - string_scanner ^1.1.0 - build 2.4.1 - analyzer >=1.5.0 <7.0.0 - async ^2.5.0 - convert ^3.0.0 - crypto ^3.0.0 - glob ^2.0.0 - logging ^1.0.0 - meta ^1.3.0 - package_config ^2.1.0 - path ^1.8.0 - build_config 1.1.1 - checked_yaml ^2.0.0 - json_annotation ^4.5.0 - path ^1.8.0 - pubspec_parse ^1.0.0 - yaml ^3.0.0 - build_daemon 4.0.1 - built_collection ^5.0.0 - built_value ^8.1.0 - crypto ^3.0.3 - http_multi_server ^3.0.0 - logging ^1.0.0 - path ^1.8.0 - pool ^1.5.0 - shelf ^1.0.0 - shelf_web_socket ^1.0.0 - stream_transform ^2.0.0 - watcher ^1.0.0 - web_socket_channel ^2.0.0 - build_resolvers 2.4.2 - analyzer >=5.12.0 <7.0.0 - async ^2.5.0 - build ^2.0.0 - collection ^1.17.0 - convert ^3.1.1 - crypto ^3.0.0 - graphs >=1.0.0 <3.0.0 - logging ^1.0.0 - package_config ^2.0.0 - path ^1.8.0 - pool ^1.5.0 - pub_semver ^2.0.0 - stream_transform ^2.0.0 - yaml ^3.0.0 - build_runner_core 7.2.11 - async ^2.5.0 - build ^2.4.0 - build_config ^1.0.0 - build_resolvers ^2.4.0 - collection ^1.15.0 - convert ^3.0.0 - crypto ^3.0.0 - glob ^2.0.0 - graphs ^2.0.0 - json_annotation ^4.8.1 - logging ^1.2.0 - meta ^1.3.0 - package_config ^2.0.0 - path ^1.8.0 - pool ^1.5.0 - timing ^1.0.0 - watcher ^1.0.0 - yaml ^3.0.0 - built_collection 5.1.1 - built_value 8.8.1 - built_collection ^5.0.0 - collection ^1.15.0 - fixnum ^1.0.0 - meta ^1.3.0 - characters 1.3.0 - checked_yaml 2.0.3 - json_annotation ^4.3.0 - source_span ^1.8.0 - yaml ^3.0.0 - ci 0.1.0 - cli_util 0.4.1 - meta ^1.3.0 - path ^1.8.0 - clock 1.1.1 - cloud_firestore_platform_interface 6.0.10 - _flutterfire_internals ^1.3.16 - collection ^1.15.0 - firebase_core ^2.24.2 - flutter any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - cloud_firestore_web 3.8.10 - _flutterfire_internals ^1.3.16 - cloud_firestore_platform_interface ^6.0.10 - collection ^1.0.0 - firebase_core ^2.24.2 - firebase_core_web ^2.10.0 - flutter any - flutter_web_plugins any - js ^0.6.3 - code_builder 4.9.0 - built_collection ^5.0.0 - built_value ^8.0.0 - collection ^1.15.0 - matcher ^0.12.10 - meta ^1.3.0 - collection 1.18.0 - convert 3.1.1 - typed_data ^1.3.0 - crypto 3.0.3 - typed_data ^1.3.0 - custom_lint 0.5.7 - analyzer >=5.12.0 <7.0.0 - analyzer_plugin ^0.11.0 - args ^2.3.1 - async ^2.9.0 - ci ^0.1.0 - cli_util ^0.4.0 - collection ^1.16.0 - freezed_annotation ^2.2.0 - json_annotation ^4.7.0 - meta ^1.7.0 - package_config ^2.0.2 - path ^1.8.0 - pub_semver ^2.1.1 - pubspec_parse ^1.2.0 - rxdart ^0.27.7 - uuid >=3.0.6 <5.0.0 - yaml ^3.1.1 - custom_lint_core 0.5.7 - analyzer >=5.12.0 <7.0.0 - analyzer_plugin ^0.11.0 - collection ^1.16.0 - custom_lint 0.5.7 - matcher ^0.12.0 - meta ^1.7.0 - path ^1.8.0 - pubspec_parse ^1.2.2 - source_span ^1.8.0 - yaml ^3.1.1 - dart_style 2.3.4 - analyzer ^6.2.0 - args >=1.0.0 <3.0.0 - collection ^1.17.0 - path ^1.0.0 - pub_semver >=1.4.4 <3.0.0 - source_span ^1.4.0 - desktop_webview_auth 0.0.14 - crypto ^3.0.3 - flutter any - http ^1.0.0 - flutter_web_plugins any - plugin_platform_interface ^2.1.4 - email_validator 2.1.17 - fake_async 1.3.1 - clock ^1.1.0 - collection ^1.15.0 - fetch_api 1.0.3 - js ^0.6.5 - fetch_client 1.0.2 - fetch_api ^1.0.0 - http >=0.13.5 <2.0.0 - file 7.0.0 - meta ^1.9.1 - path ^1.8.3 - firebase_analytics_platform_interface 3.8.4 - _flutterfire_internals ^1.3.16 - firebase_core ^2.24.2 - flutter any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - firebase_analytics_web 0.5.5+11 - _flutterfire_internals ^1.3.16 - firebase_analytics_platform_interface ^3.8.4 - firebase_core ^2.24.2 - firebase_core_web ^2.10.0 - flutter any - flutter_web_plugins any - js ^0.6.3 - firebase_auth_platform_interface 7.0.9 - _flutterfire_internals ^1.3.16 - collection ^1.16.0 - firebase_core ^2.24.2 - flutter any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - firebase_auth_web 5.8.12 - firebase_auth_platform_interface ^7.0.9 - firebase_core ^2.24.2 - firebase_core_web ^2.10.0 - flutter any - flutter_web_plugins any - http_parser ^4.0.0 - js ^0.6.3 - meta ^1.8.0 - firebase_core_platform_interface 5.0.0 - collection ^1.0.0 - flutter any - flutter_test any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - firebase_core_web 2.10.0 - firebase_core_platform_interface ^5.0.0 - flutter any - flutter_web_plugins any - js ^0.6.3 - meta ^1.8.0 - firebase_dynamic_links_platform_interface 0.2.6+16 - _flutterfire_internals ^1.3.16 - firebase_core ^2.24.2 - flutter any - meta ^1.8.0 - plugin_platform_interface ^2.1.3 - firebase_ui_localizations 1.9.0 - flutter any - flutter_localizations any - path ^1.8.3 - firebase_ui_oauth 1.4.15 - desktop_webview_auth ^0.0.14 - firebase_auth ^4.15.0 - firebase_ui_auth ^1.11.0 - firebase_ui_shared ^1.4.1 - flutter_svg ^2.0.9 - flutter any - firebase_ui_shared 1.4.1 - flutter any - fixnum 1.1.0 - flutter_localizations 0.0.0 - flutter any - intl 0.18.1 - characters 1.3.0 - clock 1.1.1 - collection 1.18.0 - material_color_utilities 0.5.0 - meta 1.10.0 - path 1.8.3 - vector_math 2.1.4 - web 0.3.0 - flutter_riverpod 2.4.9 - collection ^1.15.0 - flutter any - meta ^1.4.0 - riverpod 2.4.9 - state_notifier >=0.7.2 <2.0.0 - flutter_svg 2.0.9 - flutter any - vector_graphics ^1.1.9+1 - vector_graphics_codec ^1.1.9+1 - vector_graphics_compiler ^1.1.9+1 - flutter_web_plugins 0.0.0 - flutter any - characters 1.3.0 - collection 1.18.0 - material_color_utilities 0.5.0 - meta 1.10.0 - vector_math 2.1.4 - web 0.3.0 - freezed_annotation 2.4.1 - collection ^1.15.0 - json_annotation ^4.6.0 - meta ^1.7.0 - frontend_server_client 3.2.0 - async ^2.5.0 - path ^1.8.0 - glob 2.1.2 - async ^2.5.0 - collection ^1.15.0 - file >=6.1.3 <8.0.0 - path ^1.8.0 - string_scanner ^1.1.0 - graphs 2.3.1 - collection ^1.1.0 - html_unescape 2.0.0 - http 1.1.2 - async ^2.5.0 - http_parser ^4.0.0 - meta ^1.3.0 - web >=0.3.0 <0.5.0 - http_multi_server 3.2.1 - async ^2.5.0 - http_parser 4.0.2 - collection ^1.15.0 - source_span ^1.8.0 - string_scanner ^1.1.0 - typed_data ^1.3.0 - intl 0.18.1 - clock ^1.1.0 - meta ^1.0.2 - path ^1.8.0 - io 1.0.4 - meta ^1.3.0 - path ^1.8.0 - string_scanner ^1.1.0 - js 0.6.7 - meta ^1.7.0 - logging 1.2.0 - matcher 0.12.16 - async ^2.10.0 - meta ^1.8.0 - stack_trace ^1.10.0 - term_glyph ^1.2.0 - test_api >=0.5.0 <0.7.0 - material_color_utilities 0.5.0 - collection ^1.15.0 - mime 1.0.4 - package_config 2.1.0 - path ^1.8.0 - path 1.8.3 - path_parsing 1.0.1 - vector_math ^2.1.0 - meta ^1.3.0 - petitparser 6.0.2 - meta ^1.9.0 - plugin_platform_interface 2.1.7 - meta ^1.3.0 - pool 1.5.1 - async ^2.5.0 - stack_trace ^1.10.0 - pub_semver 2.1.4 - collection ^1.15.0 - meta ^1.3.0 - pubspec_parse 1.2.3 - checked_yaml ^2.0.1 - collection ^1.15.0 - json_annotation ^4.8.0 - pub_semver ^2.0.0 - yaml ^3.0.0 - riverpod 2.4.9 - meta ^1.9.0 - stack_trace ^1.10.0 - state_notifier >=0.7.2 <2.0.0 - riverpod_analyzer_utils 0.5.0 - analyzer >=5.12.0 <7.0.0 - collection ^1.16.0 - crypto ^3.0.2 - custom_lint_core ^0.5.2 - freezed_annotation ^2.2.0 - meta ^1.7.0 - path ^1.8.0 - source_span ^1.8.0 - rxdart 0.27.7 - shelf 1.4.1 - async ^2.5.0 - collection ^1.15.0 - http_parser ^4.0.0 - path ^1.8.0 - stack_trace ^1.10.0 - stream_channel ^2.1.0 - shelf_web_socket 1.0.4 - shelf ^1.1.0 - stream_channel ^2.1.0 - web_socket_channel ^2.0.0 - sky_engine 0.0.99 - source_gen 1.5.0 - analyzer >=5.2.0 <7.0.0 - async ^2.5.0 - build ^2.1.0 - dart_style ^2.0.0 - glob ^2.0.0 - path ^1.8.0 - source_span ^1.8.0 - yaml ^3.0.0 - source_helper 1.3.4 - analyzer >=5.12.0 <7.0.0 - collection ^1.15.0 - source_gen ^1.0.0 - source_span 1.10.0 - collection ^1.15.0 - path ^1.8.0 - term_glyph ^1.2.0 - sprintf 7.0.0 - sqflite_common 2.5.0+2 - synchronized >=3.0.0 <5.0.0 - path >=1.8.0 <3.0.0 - meta >=1.3.0 <3.0.0 - stack_trace 1.11.1 - path ^1.8.0 - state_notifier 1.0.0 - meta ^1.1.8 - stream_channel 2.1.2 - async ^2.5.0 - stream_transform 2.1.0 - string_scanner 1.2.0 - source_span ^1.8.0 - synchronized 3.1.0+1 - term_glyph 1.2.1 - test_api 0.6.1 - async ^2.5.0 - boolean_selector ^2.1.0 - collection ^1.15.0 - meta ^1.3.0 - source_span ^1.8.0 - stack_trace ^1.10.0 - stream_channel ^2.1.0 - string_scanner ^1.1.0 - term_glyph ^1.2.0 - text_to_speech_macos 0.1.1 - flutter any - text_to_speech_platform_interface 0.1.3 - flutter any - plugin_platform_interface ^2.0.1 - text_to_speech_web 0.1.2 - flutter any - flutter_web_plugins any - text_to_speech_platform_interface ^0.1.3 - timing 1.0.1 - json_annotation ^4.3.0 - typed_data 1.3.2 - collection ^1.15.0 - vector_graphics 1.1.9+1 - flutter any - vector_graphics_codec 1.1.9+1 - vector_graphics_codec 1.1.9+1 - vector_graphics_compiler 1.1.9+1 - args ^2.3.0 - meta ^1.7.0 - path_parsing ^1.0.1 - xml ^6.3.0 - vector_graphics_codec 1.1.9+1 - path ^1.8.0 - vector_math 2.1.4 - watcher 1.1.0 - async ^2.5.0 - path ^1.8.0 - web 0.3.0 - web_socket_channel 2.4.0 - async ^2.5.0 - crypto ^3.0.0 - stream_channel ^2.1.0 - webview_flutter 4.4.2 - flutter any - webview_flutter_android ^3.12.0 - webview_flutter_platform_interface ^2.6.0 - webview_flutter_wkwebview ^3.9.0 - webview_flutter_android 3.13.1 - flutter any - webview_flutter_platform_interface ^2.7.0 - webview_flutter_platform_interface 2.9.0 - flutter any - meta ^1.7.0 - plugin_platform_interface ^2.1.0 - webview_flutter_wkwebview 3.10.0 - flutter any - path ^1.8.0 - webview_flutter_platform_interface ^2.7.0 - xml 6.5.0 - collection ^1.18.0 - meta ^1.9.0 - petitparser ^6.0.0 - yaml 3.1.2 - collection ^1.15.0 - source_span ^1.8.0 - string_scanner ^1.1.0 ```

Steps to reproduce

1) Sign up a new user 2) Verify new user's e-mail 3) Delete the account (using the Firebase ProfileScreen) 4) Use Firebase SignInScreen to sign in with the deleted user's credentials

Expected Behavior

Display the input decoration error about user not being found

Actual Behavior

FirebaseAuthException ([firebase_auth/INVALID_LOGIN_CREDENTIALS] Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={FIRAuthErrorUserInfoNameKey=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., NSUnderlyingError=0x600000cbe1c0 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={NSUnderlyingError=0x600000c83210 {Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data={length = 224, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 ... 5d0a2020 7d0a7d0a }, data_content_type=application/json; charset=UTF-8}}, FIRAuthErrorUserInfoDeserializedResponseKey={
    code = 400;
    errors =     (
                {
            domain = global;
            message = "INVALID_LOGIN_CREDENTIALS";
            reason = invalid;
        }
    );
    message = "INVALID_LOGIN_CREDENTIALS";
}}}})

Additional Information

No response

danagbemava-nc commented 6 months ago

Closing this as a duplicate of https://github.com/firebase/flutterfire/issues/11903.

TLDR: Your project most likely has email enumeration protection so we are no longer informed whether or not an account exists. The issue here is that the iOS sdk does not provide a properly formatted message so the plugin cannot parse it properly. See https://github.com/firebase/flutterfire/issues/11903#issuecomment-1822341255