flutter_auth_ui
Flutter용 공식이 아닌 firebaseui 패키지입니다. 이 라이브러리는 Android, iOS 및 웹을 지원하는 것을 목표로 합니다. 이메일, 전화, Google 계정 등으로 로그인할 수 있습니다.
Flutter 앱에서 Dart를 사용하여 Firebase Auth UI를 사용하기 위한 플러터 플러그인입니다. (공식 플러그인이 아님.)
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0^2.0.0^2.0.0^1.0.0{"sdk":"flutter"}^5.0.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
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.
// 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: const TosAndPrivacyPolicy(
tosUrl: "https://www.google.com",
privacyPolicyUrl: "https://www.google.com",
),
androidOption: const AndroidOption(
enableSmartLock: false, // default true
showLogo: true, // default false
overrideTheme: true, // default false
),
emailAuthOption: const EmailAuthOption(
requireDisplayName: true, // default true
enableMailLink: false, // default false
handleURL: '',
androidPackageName: '',
androidMinimumVersion: '',
),
);
Note: In order to implement EmailLink, you will need to prepare in advance; check the firebase documentation first.
Let's check the code sample for firebase auth.
To handle dynamic link, add FlutterAuthUiPlugin.catchEmailLink to onCreate and onNewIntent.
(If you don't use EmailLink, then you don't need to add it.)
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.dr1009.app.flutter_auth_ui.FlutterAuthUiPlugin;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// check intent
FlutterAuthUiPlugin.catchEmailLink(this, getIntent());
}
@Override
protected void onNewIntent(@NonNull Intent intent) {
super.onNewIntent(intent);
// check intent
FlutterAuthUiPlugin.catchEmailLink(this, intent);
}
}
Supported without any special settings.
Check Localizing for iOS: Updating the iOS app bundle.
Check Installation - Option 1: CDN - Localized Widget.
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.
android/app/src/main/res/drawable/flutter_auth_ui_logo.xml or android/app/src/main/res/drawable-{m~xxxhdpi}/flutter_auth_ui_logo.pngAndroidOption.showLogoflutter_auth_ui_style style to your android/app/src/main/res/values/style.xmlAndroidOption.overrideTheme