Skip to content

Commit

Permalink
fix(ui_auth): fix ResponsivePage layout causing unexpected overflows (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnitsky authored Feb 28, 2023
1 parent 36f9f9b commit 80c3c5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/firebase_ui_auth/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

if (FirebaseAuth.instance.currentUser == null) {
await FirebaseAuth.instance.signInAnonymously();
}

FirebaseUIAuth.configureProviders([
EmailAuthProvider(),
emailLinkProviderConfig,
Expand Down Expand Up @@ -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 '/';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class _ResponsivePageState extends State<ResponsivePage> {
Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: breakpoint),
child: IntrinsicHeight(child: content),
child: content,
),
),
],
Expand Down
3 changes: 3 additions & 0 deletions packages/firebase_ui_auth/lib/src/widgets/error_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80c3c5e

Please sign in to comment.