flutter_auth_ui

Unofficial firebaseui package for flutter. This library aims to provide support for Android, iOS and the web. Login with Email, Phone, Google account and etc.

Getting Started

This plugin is wrapped Android/iOS/Web native plugin.

Check documents and setup your firebase project.

How to use

// Set provider
final providers = [
  AuthUiProvider.anonymous,
  AuthUiProvider.email,
  AuthUiProvider.phone,
  AuthUiProvider.apple,
  AuthUiProvider.facebook,
  AuthUiProvider.github,
  AuthUiProvider.google,
  AuthUiProvider.microsoft,
  AuthUiProvider.yahoo,
  AuthUiProvider.twitter,
];

final result = await FlutterAuthUi.startUi(
  items: providers,
  tosAndPrivacyPolicy: TosAndPrivacyPolicy(
    tosUrl: "https://www.google.com",
    privacyPolicyUrl: "https://www.google.com",
  ),
  androidOption: AndroidOption(
    enableSmartLock: false, // default true
    showLogo: true, // default false
    overrideTheme: true, // default false
  ),
  emailAuthOption: EmailAuthOption(
    requireDisplayName: true, // default true
    enableMailLink: false, // default false
    handleURL: '',
    androidPackageName: '',
    androidMinimumVersion: '',
  ),
);

Requirements

Android

  • minSdkVersion 21
  • compileSdkVersion 30

iOS

  • iOS 12 or higher

Tips

Localizing

Android

Supported without any special settings.

iOS

Check Localizing for iOS: Updating the iOS app bundle.

Web

Check Installation - Option 1: CDN - Localized Widget.

To change the title of AppBar on Android

Add the string value as app_name or fui_default_toolbar_title to your app's strings.xml file. Sample code is strings.xml.

Behavior depends on FirebaseUI-Android.

Show Logo (Android)

  1. Add your logo resource file to android/app/src/main/res/drawable/flutter_auth_ui_logo.xml or android/app/src/main/res/drawable-{m~xxxhdpi}/flutter_auth_ui_logo.png
  2. Enable AndroidOption.showLogo
  1. Add flutter_auth_ui_style style to your android/app/src/main/res/values/style.xml
  1. Enable AndroidOption.overrideTheme

Libraries

flutter_auth_ui