Removed Testcode
parent
8cec856e1c
commit
6a37ce858e
|
@ -11,7 +11,7 @@ class AuthService {
|
||||||
return _auth.currentUser;
|
return _auth.currentUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sign in
|
// sign in
|
||||||
Future<UserCredential> signInWithEmailPassword(String email, password) async {
|
Future<UserCredential> signInWithEmailPassword(String email, password) async {
|
||||||
try {
|
try {
|
||||||
UserCredential userCredential = await _auth.signInWithEmailAndPassword(
|
UserCredential userCredential = await _auth.signInWithEmailAndPassword(
|
||||||
|
@ -19,15 +19,6 @@ class AuthService {
|
||||||
password: password,
|
password: password,
|
||||||
);
|
);
|
||||||
|
|
||||||
// save user info if it does not already exist
|
|
||||||
// TODO TESTING - same code snippet as for sign up
|
|
||||||
_firestore.collection("Users").doc(userCredential.user!.uid).set(
|
|
||||||
{
|
|
||||||
'uid': userCredential.user!.uid,
|
|
||||||
'email': email,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
return userCredential;
|
return userCredential;
|
||||||
} on FirebaseAuthException catch (e) {
|
} on FirebaseAuthException catch (e) {
|
||||||
throw Exception(e.code);
|
throw Exception(e.code);
|
||||||
|
|
Loading…
Reference in New Issue