- Notifications
You must be signed in to change notification settings - Fork9
A Flutter plugin for using the Firebase Auth UI with Dart in Flutter apps. (not official plugin.)
License
koji-1009/flutter_auth_ui
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
This plugin is wrapped Android/iOS/Web native plugin.
Check documents and setup your firebase project.
- iOS :https://firebase.google.com/docs/auth/ios/firebaseui
- Android :https://firebase.google.com/docs/auth/android/firebaseui
- Web:https://firebase.google.com/docs/auth/web/firebaseui
// Set providerfinal providers= [AuthUiProvider.anonymous,AuthUiProvider.email,AuthUiProvider.phone,AuthUiProvider.apple,AuthUiProvider.facebook,AuthUiProvider.github,AuthUiProvider.google,AuthUiProvider.microsoft,AuthUiProvider.yahoo,AuthUiProvider.twitter,];final result=awaitFlutterAuthUi.startUi( items: providers, tosAndPrivacyPolicy:constTosAndPrivacyPolicy( tosUrl:"https://www.google.com", privacyPolicyUrl:"https://www.google.com", ), androidOption:constAndroidOption( enableSmartLock:false,// default true showLogo:true,// default false overrideTheme:true,// default false ), emailAuthOption:constEmailAuthOption( requireDisplayName:true,// default true enableMailLink:false,// default false handleURL:'', androidPackageName:'', androidMinimumVersion:'', ),);
- flutter 3.13.0 or higher
- firebase_auth 5.0.0 or higher
- minSdkVersion 21
- compileSdkVersion 34
- iOS 13 or higher
Note: In order to implement EmailLink, you will need to prepare in advance; check thefirebase documentation first.
Let's check the code sample for firebase auth.
To handle dynamic link, addFlutterAuthUiPlugin.catchEmailLink
toonCreate
andonNewIntent
.(If you don't use EmailLink, then you don't need to add it.)
importandroid.content.Intent;importandroid.os.Bundle;importandroidx.annotation.NonNull;importandroidx.annotation.Nullable;importcom.dr1009.app.flutter_auth_ui.FlutterAuthUiPlugin;importio.flutter.embedding.android.FlutterActivity;publicclassMainActivityextendsFlutterActivity {@OverrideprotectedvoidonCreate(@NullableBundlesavedInstanceState) {super.onCreate(savedInstanceState);// check intentFlutterAuthUiPlugin.catchEmailLink(this,getIntent()); }@OverrideprotectedvoidonNewIntent(@NonNullIntentintent) {super.onNewIntent(intent);// check intentFlutterAuthUiPlugin.catchEmailLink(this,intent); }}
Supported without any special settings.
CheckLocalizing for iOS: Updating the iOS app bundle.
CheckInstallation - Option 1: CDN - Localized Widget.
Add the string value asapp_name
orfui_default_toolbar_title
to your app'sstrings.xml
file.Sample code isstrings.xml.
Behavior depends onFirebaseUI-Android.
- Add your logo resource file to
android/app/src/main/res/drawable/flutter_auth_ui_logo.xml
orandroid/app/src/main/res/drawable-{m~xxxhdpi}/flutter_auth_ui_logo.png
- Enable
AndroidOption.showLogo
- Add
flutter_auth_ui_style
style to yourandroid/app/src/main/res/values/style.xml
- Enable
AndroidOption.overrideTheme
About
A Flutter plugin for using the Firebase Auth UI with Dart in Flutter apps. (not official plugin.)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.