A login page using Firebase Authentication for email, google, apple and facebook signins.

Features

Authenticate against Firebase using multiple providers.

Getting started

  1. Ensure you've setup firebase on the app and have a firebase.json file in the root.
  2. Ensure you have a firebase obtions file configured in lib/firebaseOptions.dart
  3. Set up the GIDClient ID for your app in ios:
<key>GIDClientID</key>
	<string>XXXXXXXXXXXXXXX.apps.googleusercontent.com</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>com.googleusercontent.apps.XXXXXXXXXXXXXXX</string>
			</array>
		</dict>
	</array>
  1. For android (To be confirmed)...

Usage

BiltLoginScreen(
    auth: authService.firebaseAuth,
    providers: [
        constants.AuthProvider.Email,
        constants.AuthProvider.Google,
        constants.AuthProvider.Apple,
    ],
    onSignInComplete:
        (user, provider) =>
            handleSignIn(context, user, provider),
    logo: Image.asset(
        'assets/logo.png',
        width: 300,
        height: 300,
    ),
    backgroundImage: Image.asset(
        'assets/login_bg.jpg',
        fit: BoxFit.fill,
        width: double.infinity,
        height: double.infinity,
    ),
)

Additional information

Check out the example/ folder for a full implementation of the package.