パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v4.0.1

flutter_auth_ui

Flutter用の公式ではないfirebaseuiパッケージ。このライブラリはAndroid、iOS、Webのサポートを提供することを目的としています。メール、電話、Googleアカウントなどでのログインに対応しています。

AndroidiOSWeb
30日間ダウンロード
156
いいね数
68
Pub ポイント
140

パッケージをインストール

flutter pub add flutter_auth_ui

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_auth_ui は FirebaseUI にインスパイアされた非公式の Flutter パッケージで、Android、iOS、Web プラットフォーム間での認証を簡素化することを目的としています。メール、電話、Google サインインなどの一般的な認証フロー用の事前構築済み UI コンポーネントを提供しています。Flutter のクロスプラットフォーム機能を活用して開発されており、ボイラープレートコードを減らしつつ一貫したユーザー体験を維持することを目指しています。Firebase Authentication とシームレスに統合され、パスワードレスログインやマルチファクターアセスメントといった現代的な認証パターンもサポートしています。

用途

  • メール/パスワードログインの実装
  • Google サインインの有効化
  • 電話番号認証の追加
  • ウェブ上でセキュアなログインフローを構築する
  • マルチプラットフォームアプリのサポート

主な機能

  • 事前構築された認証UI
  • クロスプラットフォーム対応(Android、iOS、Web)
  • Firebase 認証との統合
  • パスワードレスおよびMFA対応
  • カスタマイズ可能なテーマとスタイル

適している対象

  • クロスプラットフォームアプリを開発する開発者
  • 迅速な認証の実装が必要なチーム
  • Firebase をバックエンドとして使用するプロジェクト
  • デバイス間で一貫した認証UXを必要とするアプリ
  • 迅速なMVP開発に注力するスタートアップ

注意事項

  • Firebaseのセットアップが必要です
  • ネイティブUIと比べてカスタマイズの選択肢が限られている
  • 外部のFirebaseサービスに依存しています
  • 追加の状態管理が必要になる可能性があります
  • Firebaseによって公式にメンテナンスされていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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: 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: '',
  ),
);

Requirements

Android
  • minSdkVersion 21
  • compileSdkVersion 34
iOS
  • iOS 13 or higher

Link

Tips

EmailLink

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.

Android

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);
    }
}
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
Change Appbar and link color (Android)
  1. Add flutter_auth_ui_style style to your android/app/src/main/res/values/style.xml
  1. Enable AndroidOption.overrideTheme

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。