Description
Bug report
Describe the bug
Official example at firebase/flutterfire/packages/firebase_ui_auth/example/main.dart
does not work: clicking the link in iPhone 14 Simulator "Safari" application accessing Gmail shows error message, and the callback AuthStateChangeAction not being fired
I am using updated "master" branch today, with all recent changes, but I initially noticed this issue weeks ago. Finally resolved by "workaround" (see below).
Steps to reproduce
Steps to reproduce the behavior:
- Go to
firebase/flutterfire/packages/firebase_ui_auth/example/main.dart
- add debug line 252 `print("successfully signed in");(see screenshot)
- run with iPhone 14 Pro iOS 16.2 simulator
- try to use "Sign in with magic link"
- Open "Safari", access GMail, click the link (see screenshot)
- Redirect error message in Safari (see screenshot)
Expected behavior
- After clicking Email "magic link" from the mobile device, Example application should automatically open and redirect to "/" route
- AuthStateChangeAction being fired
- Android Studio console should show debug message "successfully signed in"
Sample project
Official firebase/flutterfire/packages/firebase_ui_auth/example/main.dart
with one-line debug message change (see attached)
Additional context
Note that I was able to fix this issue by workaround:
FirebaseAuth.instance.authStateChanges().listen((user) { if (FirebaseAuth.instance.currentUser != null) { Get.offAllNamed(HomeScreen.routeName); } });
- and it works just perfect: clicking link from Safari's "GMail" will automatically open my application's "Home" screen.
Note also that example application will be already authenticated, but to find this you need to explicitly close it and open again.
Please provide also step-by-step guide on how to configure IOS and Android to make it work: <key>FirebaseDeepLinkPasteboardRetrievalEnabled</key>
and etc.; it is not documented at all with the example application, including necessary Firebase "dynamic links", App Store, and other settings. README.md
has only 17 lines but we need detailed step-by-step guide.