From 80c3c5efbe329a780ae247da281d775f91125b56 Mon Sep 17 00:00:00 2001 From: Andrei Lesnitsky Date: Tue, 28 Feb 2023 11:33:48 +0100 Subject: [PATCH] fix(ui_auth): fix ResponsivePage layout causing unexpected overflows (#10533) --- packages/firebase_ui_auth/example/lib/main.dart | 6 +----- .../lib/src/screens/internal/responsive_page.dart | 2 +- packages/firebase_ui_auth/lib/src/widgets/error_text.dart | 3 +++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/firebase_ui_auth/example/lib/main.dart b/packages/firebase_ui_auth/example/lib/main.dart index 5a6323255c1f..26a74b74783a 100644 --- a/packages/firebase_ui_auth/example/lib/main.dart +++ b/packages/firebase_ui_auth/example/lib/main.dart @@ -34,10 +34,6 @@ Future main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); - if (FirebaseAuth.instance.currentUser == null) { - await FirebaseAuth.instance.signInAnonymously(); - } - FirebaseUIAuth.configureProviders([ EmailAuthProvider(), emailLinkProviderConfig, @@ -71,7 +67,7 @@ class FirebaseAuthUIExample extends StatelessWidget { String get initialRoute { final auth = FirebaseAuth.instance; - if (auth.currentUser == null || auth.currentUser!.isAnonymous) { + if (auth.currentUser == null) { return '/'; } diff --git a/packages/firebase_ui_auth/lib/src/screens/internal/responsive_page.dart b/packages/firebase_ui_auth/lib/src/screens/internal/responsive_page.dart index f33edae5a76c..192517d75e71 100644 --- a/packages/firebase_ui_auth/lib/src/screens/internal/responsive_page.dart +++ b/packages/firebase_ui_auth/lib/src/screens/internal/responsive_page.dart @@ -176,7 +176,7 @@ class _ResponsivePageState extends State { Center( child: ConstrainedBox( constraints: BoxConstraints(maxWidth: breakpoint), - child: IntrinsicHeight(child: content), + child: content, ), ), ], diff --git a/packages/firebase_ui_auth/lib/src/widgets/error_text.dart b/packages/firebase_ui_auth/lib/src/widgets/error_text.dart index e2ff0e4f9484..f3784738c7b2 100644 --- a/packages/firebase_ui_auth/lib/src/widgets/error_text.dart +++ b/packages/firebase_ui_auth/lib/src/widgets/error_text.dart @@ -24,6 +24,9 @@ String? localizedErrorText( return labels.wrongOrNoPasswordErrorText; case 'credential-already-in-use': return labels.credentialAlreadyInUseErrorText; + case 'invalid-verification-code': + // TODO(@lesnitsky): localization + return 'The code you entered is invalid. Please try again.'; default: return null;