In flutter, I implement forgot password page.
This is package implementation
import 'package:firebase_auth/firebase_auth.dart' as firebase_auth;
Instance
firebase_auth.FirebaseAuth _firebaseAuth = firebase_auth.FirebaseAuth.instance;
Password Reset Code
Future<void> resetPassword() async {
try{
await _firebaseAuth.sendPasswordResetEmail(email: emailController.text);
_toastMessages.toastSuccess("Password Reset Link Send!");
} catch(e){
print(e.toString());
}
}
How can I update the new user's password in the firestore and realtime database?
Firebase auth password isn't directly connected to Firestore, once the user reset their password using the reset password link they can log in and uses all Firebase services your system provides without any additional steps from your side.
If you are storing the raw user's passwords in Firestore this is a completely different story!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.