faui 1.0.2 copy "faui: ^1.0.2" to clipboard
faui: ^1.0.2 copied to clipboard

outdated

Authentication UI for Flutter. Uses Firebase auth as security provider. The library provides UI to register user, validate email, sign in, sign out, restore password.

flutter-auth-ui (faui) #

faui is an authentication UI for Flutter. It registers users with email and password using Firebase security as a service ( SECaaS ). The library provides UI to register user, validate email, sign in, sign out and restore password. Also it supports silent sign in.

Demo #

Explore UX here.

Source code: flutter-auth-ui-demo.

Getting Started #

Create Project in Firebase #

To test the library use demo project.

apiKey: "AIzaSyA3hshWKqeogfYiklVCCtDaWJW8TfgWgB4"

Then you will want to create your project:

  1. Sign in to firebase console https://console.firebase.google.com/
  2. Add, configure and open project
  3. In the project open tab "Authentication" and then tab "Sign-in Method"
  4. Click "Email/Password", set "Enable" and click "Save"
  5. Select "Project Settings" (gear icon)
  6. Copy your "Web API Key"

Set Dependency #

  1. Update pubspec.yaml to make sure your project references necessary packages:
dependencies:
  ...
  faui: ^0.0.1

Update Code #

In the beginning of the method build of the widget that requires authentication (it should be stateful), add the code:

if (faui.User == null) {
  return faui.BuildAuthScreen(
    onExit: this.setState((){...}),
    firebaseApiKey: "...",
  );
}

Packages to import:

import 'package:faui/faui.dart';
import 'package:faui/faui_model.dart';

Get user email:

faui.User.email

Sign out:

faui.SignOut()

Silent sign-in:


// Before runApp:
WidgetsFlutterBinding.ensureInitialized();
await faui.TrySignInSilently(firebaseApiKey: '...');
...

// After sign in with dialog:
faui.SaveUserLocallyForSilentSignIn();
11
likes
0
points
365
downloads

Publisher

verified publisherjob-chat.com

Weekly Downloads

Authentication UI for Flutter. Uses Firebase auth as security provider. The library provides UI to register user, validate email, sign in, sign out, restore password.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypted_preferences, flutter, http, uuid

More

Packages that depend on faui