This commit is contained in:
Felipe
2024-02-20 17:11:43 -05:00
parent 29d18e93e0
commit e00772f58a
21 changed files with 386 additions and 279 deletions
@@ -58,6 +58,13 @@ class AuthenticationRepository extends GetxController {
);
}
Future<bool> verifyOTP(String otp) async {
var credentials = await _auth.signInWithCredential(
PhoneAuthProvider.credential(
verificationId: verificationId.value, smsCode: otp));
return credentials.user != null ? true : false;
}
Future<void> updatePhoneNumber(String verificationId, String smsCode) async {
try {
PhoneAuthCredential credential = PhoneAuthProvider.credential(
@@ -69,13 +76,6 @@ class AuthenticationRepository extends GetxController {
}
}
Future<bool> verifyOTP(String otp) async {
var credentials = await _auth.signInWithCredential(
PhoneAuthProvider.credential(
verificationId: verificationId.value, smsCode: otp));
return credentials.user != null ? true : false;
}
Future<void> createUserWithEmailAndPassword(
String email, String password) async {
try {