A login page using Firebase Authentication for email, google, apple and facebook signins.
Features
Authenticate against Firebase using multiple providers.
Getting started
- Ensure you've setup firebase on the app and have a firebase.json file in the root.
- Ensure you have a firebase obtions file configured in lib/firebaseOptions.dart
- 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>
- 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.