firebase / FirebaseUI-Flutter

Apache License 2.0
101 stars 91 forks source link

πŸ› [firebase_ui_auth] too many bugs #41

Closed graemep-nz closed 1 year ago

graemep-nz commented 1 year ago

Bug report

Using pub dev firebase_ui_auth 1.1.9

  1. On the "register" screen, when you click the "register" button, nothing happens. There is no feedback that says you have been registered, and no recognition that you have been registered, even though you have been. How do such basic bugs get into a public release????????????
  2. When you click the "delete account" button, it goes ahead and deletes your account without prompting to ask if you meant to delete the account. This is another basic problem that shouldn't get into a public release.
  3. When you click the "verify email" button on the profile page, it says "verifying email" with spinning cursor forever even though the verify email gets sent and responded to. This bug has been reported before and was closed as fixed. How can you close a bug that hasn't been fixed?
  4. This bug is also not fixed 9229
  5. In profile_screen.dart there is a bunch of plain English text strings that need to be internationalised.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` C:\Users\graem>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.7.1, on Microsoft Windows [Version 10.0.22621.1194], locale en-NZ) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1) [!] Android Studio (version 2022.1) X Unable to find bundled Java version. [√] VS Code (version 1.70.2) [√] VS Code, 64-bit edition (version 1.69.2) [√] Connected device (3 available) [√] HTTP Host Availability ```

Flutter dependencies

Click To Expand ``` C:\GP\project\flutter\firebase_with_flutter>flutter pub deps -- --style=compact Dart SDK 2.19.1 Flutter SDK 3.7.1 firebase_with_flutter 1.0.0+1 dependencies: - cloud_firestore 4.3.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cupertino_icons 1.0.5 - firebase_auth 4.2.5 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_auth_platform_interface 6.11.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_core 2.4.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface] - firebase_ui_auth 1.1.9 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth flutter flutter_localizations flutter_svg] - firebase_ui_localizations 1.1.0 [flutter flutter_localizations intl path] - firebase_ui_oauth 1.1.9 [desktop_webview_auth firebase_auth firebase_ui_auth flutter_svg flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - google_fonts 4.0.3 [flutter http path_provider crypto] - provider 6.0.5 [collection flutter nested] dev dependencies: - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] transitive dependencies: - _flutterfire_internals 1.0.12 [collection firebase_core firebase_core_platform_interface flutter meta] - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - characters 1.2.1 - clock 1.1.1 - cloud_firestore_platform_interface 5.10.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.2.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.17.0 - crypto 3.0.2 [typed_data] - desktop_webview_auth 0.0.11 [crypto flutter http flutter_web_plugins plugin_platform_interface] - email_validator 2.1.17 - fake_async 1.3.1 [clock collection] - ffi 2.0.1 - file 6.1.4 [meta path] - firebase_auth_web 5.2.4 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_web 2.1.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_dynamic_links 5.0.11 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.3+26 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - http 0.13.5 [async http_parser meta path] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - intl 0.17.0 [clock path] - js 0.6.5 [meta] - lints 2.0.1 - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - nested 1.0.0 [flutter] - path 1.8.2 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider 2.0.12 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - path_provider_android 2.0.22 [flutter path_provider_platform_interface] - path_provider_foundation 2.1.1 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.5 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32] - petitparser 5.1.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.3 [meta] - process 4.2.4 [file path platform] - sky_engine 0.0.99 - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - stream_channel 2.1.1 [async] - string_scanner 1.2.0 [source_span] - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.1 [collection] - vector_math 2.1.4 - win32 3.1.3 [ffi] - xdg_directories 0.2.0+3 [meta path process] - xml 6.2.2 [collection meta petitparser] ```

darshankawar commented 1 year ago

Thanks for the report @graemep-nz I verified all the listed behaviors using the plugin example running on iOS. I clicked on the email link and verified it, but got below:

Screenshot 2023-02-08 at 3 41 17 PM

So the verification screen keeps going on as below:

Screenshot 2023-02-08 at 3 31 20 PM

Same as above when using sign in with magic link button.

/cc @Lyokone @lesnitsky

lesnitsky commented 1 year ago

@graemep-nz

  1. On the "register" screen, when you click the "register" button, nothing happens.

Did you provide actions property?

SignInScreen(
  actions: [
    AuthStateChangeAction<UserCreated>((context, state) {
      // perform post-registration logic here, for example – open a new screen
    }),
  ],
);
  1. When you click the "delete account" button, it goes ahead and deletes your account without prompting to ask if you meant to delete the account. This is another basic problem that shouldn't get into a public release.

firebase/FirebaseUI-Flutter#40

  1. When you click the "verify email" button on the profile page, it says "verifying email" with spinning cursor forever even though the verify email gets sent and responded to. This bug has been reported before and was closed as fixed. How can you close a bug that hasn't been fixed?

There is a chance that something has changed in the underlying package or apple-specific configuration. Make sure you pass a correct ActionCodeSettings and configure your app according to this documentation

An easy way to verify that everything is configured correctly is to create a dynamic link and try to handle it with firebase_dynamic_links package. If you are able to receive a link in your app with this package, but still can't get email verification working – this means the issue is indeed in the firebase_ui.

  1. This bug is also not fixed https://github.com/firebase/flutterfire/issues/9229

Please provide a reproducible example.

  1. In profile_screen.dart there is a bunch of plain English text strings that need to be internationalized.

Localization-related issues will be handled a bit later since the localization team is a bit busy and slow to respond, so we're accumulating more labels so that we can get all translated in a single batch.


It is easier for us to track each individual problem/bug under a separate issue, so I'd be grateful if you can submit several issues next time, instead of a single one with a list of problems.

If something was fixed, but you are still able to reproduce it – feel free to reopen the previously submitted issue and leave a comment on what exactly is not working for you. Ideally, this comment should contain a code snippet/link to a repo (read more about minimal reproducible examples here). Very often something is not working because something is not configured properly or misused. These examples help a lot and speed up the process.

graemep-nz commented 1 year ago

I will reply in the near future, probably tomorrow.

graemep-nz commented 1 year ago

see also https://github.com/firebase/flutterfire/issues/10431 https://github.com/firebase/FirebaseUI-Flutter/issues/39 https://github.com/firebase/FirebaseUI-Flutter/issues/38 https://github.com/firebase/FirebaseUI-Flutter/issues/37 https://github.com/firebase/FirebaseUI-Flutter/issues/36 https://github.com/firebase/FirebaseUI-Flutter/issues/35 https://github.com/firebase/FirebaseUI-Flutter/issues/34

(Quote) On the "register" screen, when you click the "register" button, nothing happens. Did you provide actions property?

image

I didn't know it was necessary to provide UserCreated action. It wasn't in the code example that I got from the flutterfire web page (404 now https://github.com/firebase/flutterfire/tree/master/packages/flutterfire_ui) and it's not documented anywhere. It works fine with that included.

image

(Quote) Make sure you pass a correct ActionCodeSettings and configure your app according to this documentation

image

I didn't know it was necessary to pass ActionCodeSettings. It wasn't in the code example that I got from the flutterfire web page (404 now https://github.com/firebase/flutterfire/tree/master/packages/flutterfire_ui) and it's not documented anywhere. Email verify works ok for web. I guess it will work for android once I figure out how to use ActionCodeSettings.

image

(Quote) Enable more sign-in methods problem. Please provide a reproducible example. image

https://github.com/firebase/FirebaseUI-Flutter/issues/39 I haven't tested with more than one sign-in method yet.

The system doesn't let me re-open closed issues.

image

Regarding email verify, it would be preferable if the email address could be verified before a new user was registered in firebase. The original example code I got from flutterfire went straight from signup to profile screen but I found a new example that blocked getting to the profile screen until email was verified. It seems that the email verify options on the profile page are kind of redundant (and a bit clunky) when there is a nice "email verify" screen (that I didn't know about). image

It would be nice to have a public roadmap for when ui_auth will be useable in a production app.

zachary22321 commented 1 year ago

The person who wrote this had very good points, it may make sense to update the documentation. My experience was the exact same as his.

kodejack commented 1 year ago

Also had a similar experience I moved from the flutterfire package and it was not obvious how to get things working. Email Verification looks like it should just work looking at the code, the need for actionCodeSettings makes what is a simple process much more complex.

lesnitsky commented 1 year ago

Closing, as issues mentioned here were filed individually. Feel free to submit new issues if something is not covered