Flutter firebase authentication
HTML-код
- Опубликовано: 27 ноя 2024
- This video covers the basic of how we use #firebase auth in our #flutter project to register user and sign them in.
I hope you like the video.
Let me know in comments on how you like the video and any more topics that you would like me to cover.
Kindly subscribe to the channel and hit the like button.
thank u
شكرا لك من القلب لمجهودك الرائع . صديقك من 🇮🇶 العراق
Glad it worked.
Dear Please post new Tutorials The way you teach is So amazing i searched alot on youtube but noone teaches like you Do
please it has been long you havent post any video
It's been 11months already now new videos yet.
Plz for logout and forget passowrd tutorial
Will get that video up soon.
@@flutterwithme2530 Please, x2
@@flutterwithme2530 please one video on OTP authentication also 🤗
Hi, excuse me, how do I bind the UID to a database user in Firestore database?
And if in the form I wanted to add fields such as name and last name, how do I save this data along with the email and password? Thanks.
You would need to push the data accordingly.
Refer to the code below.
FirebaseAuth.instance
.createUserWithEmailAndPassword(
email: emailInputController.text,
password: pwdInputController.text)
.then((currentUser) => Firestore.instance
.collection("users")
.document(currentUser.uid)
.setData({
"uid": currentUser.uid,
"fname": firstNameInputController.text,
"surname": lastNameInputController.text,
"email": emailInputController.text,
})
.then((result) => {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => HomePage(
title:
firstNameInputController
.text +
"'s Tasks",
uid: currentUser.uid,
)),
(_) => false),
firstNameInputController.clear(),
lastNameInputController.clear(),
emailInputController.clear(),
pwdInputController.clear(),
confirmPwdInputController.clear()
})
.catchError((err) => print(err)))
.catchError((err) => print(err));
@@flutterwithme2530 Thanks bro