Edit User profile
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
|
||||
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:flutter_login_facebook/flutter_login_facebook.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:le_kiosque_by_gcs/services/firestore/user_service.dart';
|
||||
|
||||
class MainAuth implements Auth {
|
||||
|
||||
FirebaseAuth _auth = FirebaseAuth.instance;
|
||||
|
||||
@override
|
||||
@@ -17,7 +16,9 @@ class MainAuth implements Auth {
|
||||
final userAuth = await googleUser.authentication;
|
||||
if (userAuth.accessToken != null) {
|
||||
final authCredential = GoogleAuthProvider.credential(
|
||||
accessToken: userAuth.accessToken, idToken: userAuth.idToken);
|
||||
accessToken: userAuth.accessToken,
|
||||
idToken: userAuth.idToken,
|
||||
);
|
||||
final authResult = await _auth.signInWithCredential(authCredential);
|
||||
return authResult.user;
|
||||
} else {
|
||||
@@ -66,4 +67,4 @@ class MainAuth implements Auth {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user