65 lines
2.4 KiB
Markdown
65 lines
2.4 KiB
Markdown
<!--
|
|
* Copyright (C) 2022 WYATT GROUP
|
|
* Please see the AUTHORS file for details.
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* any later version.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
-->
|
|
|
|
# Flutter - Authentication BLoC
|
|
|
|
<p align="left">
|
|
<a href="https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis">
|
|
<img src="https://img.shields.io/badge/Style-Wyatt%20Analysis-blue.svg?style=flat-square" alt="Style: Wyatt Analysis" />
|
|
</a>
|
|
<img src="https://img.shields.io/badge/SDK-Flutter-blue?style=flat-square" alt="SDK: Flutter" />
|
|
</p>
|
|
|
|
Authentication Bloc for Flutter.
|
|
|
|
## Features
|
|
|
|
- Wyatt Architecture
|
|
- Entities:
|
|
- Account : AccountModel -> Contains account information from provider
|
|
- AccountWrapper : AccountWrapperModel -> Contains account and extra data.
|
|
- Data Sources:
|
|
- Local:
|
|
- Cached Authentication Data : AuthenticationCacheDataSourceImpl -> Provides a cache implementation
|
|
- Remote:
|
|
- Remote Authentication Data : AuthenticationFirebaseDataSourceImpl -> Provides a proxy to FirebaseAuth
|
|
- Repositories:
|
|
- AuthenticationRepository : AuthenticationRepositoryImpl -> Provides all authentication methods
|
|
- Features:
|
|
- Authentication:
|
|
- AuthenticationBuilder : widget to build reactive view from authentication state
|
|
- AuthenticationCubit : tracks every auth changes, have sign out capability.
|
|
- SignUp:
|
|
- SignUpCubit: implementation of a FormDataCubit from `wyatt_form_bloc` for the sign up
|
|
- SignIn:
|
|
- SignUpCubit: implementation of a FormDataCubit from `wyatt_form_bloc` for the sign in
|
|
- Consistent
|
|
* Every class have same naming convention
|
|
- Tested
|
|
|
|
## Getting started
|
|
|
|
Simply add `wyatt_authentication_bloc` in `pubspec.yaml`, then
|
|
|
|
```dart
|
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
|
```
|
|
|
|
## Usage
|
|
|
|
// TODO |