Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

updating dependencies on firebase_auth and flutter_facebook_login #19

Merged
merged 1 commit into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ build/
ios/.generated/
packages
pubspec.lock

example/ios/Flutter/flutter_export_environment.sh
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.0.8] - 02/10/2019
* update dependencies

## [1.0.7] - 21/5/2019
* fixed padding

Expand Down
8 changes: 5 additions & 3 deletions lib/login_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class _LoginViewState extends State<LoginView> {
try {
AuthCredential credential = GoogleAuthProvider.getCredential(
idToken: googleAuth.idToken, accessToken: googleAuth.accessToken);
FirebaseUser user = await _auth.signInWithCredential(credential);
AuthResult authResult = await _auth.signInWithCredential(credential);
FirebaseUser user = authResult.user;
print(user);
} catch (e) {
showErrorDialog(context, e.details);
Expand All @@ -62,12 +63,13 @@ class _LoginViewState extends State<LoginView> {

_handleFacebookSignin() async {
FacebookLoginResult result =
await facebookLogin.logInWithReadPermissions(['email']);
await facebookLogin.logIn(['email']);
if (result.accessToken != null) {
try {
AuthCredential credential = FacebookAuthProvider.getCredential(
accessToken: result.accessToken.token);
FirebaseUser user = await _auth.signInWithCredential(credential);
AuthResult authResult = await _auth.signInWithCredential(credential);
FirebaseUser user = authResult.user;
print(user);
} catch (e) {
showErrorDialog(context, e.details);
Expand Down
4 changes: 3 additions & 1 deletion lib/password_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ class _PasswordViewState extends State<PasswordView> {

_connexion(BuildContext context) async {
FirebaseAuth _auth = FirebaseAuth.instance;
AuthResult authResult;
FirebaseUser user;
try {
user = await _auth.signInWithEmailAndPassword(
authResult = await _auth.signInWithEmailAndPassword(
email: _controllerEmail.text, password: _controllerPassword.text);
user = authResult.user;
print(user);
} catch (exception) {
//TODO improve errors catching
Expand Down
3 changes: 2 additions & 1 deletion lib/sign_up_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ class _SignUpViewState extends State<SignUpView> {

FirebaseAuth _auth = FirebaseAuth.instance;
try {
FirebaseUser user = await _auth.createUserWithEmailAndPassword(
AuthResult authResult = await _auth.createUserWithEmailAndPassword(
email: _controllerEmail.text,
password: _controllerPassword.text,
);
FirebaseUser user = authResult.user;
try {
var userUpdateInfo = new UserUpdateInfo();
userUpdateInfo.displayName = _controllerDisplayName.text;
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: firebase_ui
description: Firebase auth UI, dart package to mimic the firebaseUI(Google,Facebook,Twitter,Email supported)
version: 1.0.7
version: 1.0.8
author: Nicholas Bowler <crucifixx25@gmail.com>
homepage: https://github.com/Maliffic/firebase_ui

Expand All @@ -13,10 +13,10 @@ dependencies:

flutter_twitter: ^1.1.2

firebase_auth: ^0.11.1+12
firebase_auth: ^0.14.0+5

google_sign_in: ^4.0.4
flutter_facebook_login: ^2.0.1
flutter_facebook_login: ^3.0.0

dev_dependencies:
flutter_test:
Expand Down