fteam_authentication_firebase 1.0.1+2 fteam_authentication_firebase: ^1.0.1+2 copied to clipboard
FTeam's Datasource Authentication, this package - This package was developed to be a facilitator to implement the different forms of login that we have (facebook, apple, google, etc.)
fteam_authentication_firebase #
Fteam' Datasource Authentication using Firebase
Install #
Add in your pubspec.yaml
dependencies:
fteam_authentication_firebase:
Usage #
Configure natives: firebase_core firebase_auth google_sign_in flutter_facebook_auth sign_in_with_apple
main(){
WidgetsFlutterBinding.ensureInitialized();
//IMPORTANT iOS Auth Users
startFirebaseDatasource(
ProviderOptions(
appleClientId: 'br.com.example',
appleRedirectUri: Uri.parse('https://exemplo.com'),
),
);
runApp(
...
),
);
...
//Utilize [Dartz](https://pub.dev/packages/dartz)
Future signInGoogle() async {
final result = await FTeamAuth.login(ProviderLogin.google);
result.fold((l) => print(l.toString()), (r) => r?.email);
}
}
Dica ⚠ #
Se tiver error na versão do Kotlin vai em:
android/build.gradle
na seção buildscript na chave ext.kotlin_version coloque o valor 1.6.10
android/app/build.gradle
na seção dependencies implementation 'com.google.firebase:firebase-auth:19.2.0'