Repository navigation
Is there any way to implement forgot password and send verification mail firebase #12459
Description
Activity
- addedc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capability
on Oct 10, 2017 Looking at the implementation - the Firebase SDK already has
sendPasswordResetEmail
method.
Wouldn't it be just a matter of exposing this method in Flutter Auth plugin?P.S. happy to do a PR
P.P.S. just wanted to reinforce thatforget passwordfunctionality is sort of essentials in any serious app experience.Reacted by Deric CainI agree. Unless I am missing something, I do not see a way to update the password either, so one of those two should be available.
EDIT: I worked around the ability to not be able to update a password by using Firebase Cloud Functions. There could be a flow to reset a password using a flow outside of Flutter. I do not think this is a long-term solution, but it is a solution for now.
@dericgw Would you consider sharing the FCF's you used for this here?
Thanks!
@Arno-Z Sure thing! Here is the code that I used (tested and working as of today):
const functions = require('firebase-functions'); const admin = require('firebase-admin'); // Credentials needed const serviceAccount = require('./service-account.json'); admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); exports.updateUserPassword = functions.https.onRequest((request, response) => { const { uid, email, password } = request.body; admin.auth().updateUser(uid, { email, password }).then((updateResponse) => { return response.send({ error: false, message: 'The user has been updated.', result: updateResponse, }); }).catch((error) => { return response.send({ error: true, message: error, result: null, }); }); })
- Thanks Deric
Hi all,
the Flutter Plugin was updated - so you can send reset password link just cal:
sendPasswordResetEmailfromFirebaseAuth.The issue can be closed as done.
Reacted by Deric Cain, dd, Harry Turton, Jeroen Meijer (Jay), Ooasis, dR4y54m5, jiya1, kyle, Herc, cielo and 3 moreReacted by AdamReacted by Deric Cain, dd, Jeroen Meijer (Jay), kyle and nico2345I wouldn't call it done yet? SendPasswordResetEmail is implemented but sending account verification email message is still missing.
Reacted by Tobias Reinke, Lance Johnstone, Adam, Robbie Boyd, Harry Turton, Jeroen Meijer (Jay), Ooasis, Salvatore Giordano, Tuan Anh Tran Caraballo, kyle and 6 moreAny updates on this? Flutter hasn't worked for me. Happy to open a pr.
@tuancaraballo doesn't seem to be a PR waiting yet, so a PR from you would be welcome.
- I have this working with firebase_auth version 0.5.15: ```dart _sendLostPassWordLink() { final form = formKey.currentState; if (form.validate()) { _auth.sendPasswordResetEmail(email: passwordController.text).then((result){ Scaffold.of(context).showSnackBar( const SnackBar(content: const Text('Requesting password reset email')), ); }).catchError((error){ Scaffold.of(context).showSnackBar( // ignore: use_of_void_result const SnackBar(content: const Text('Password reset failed, did you enter the correct address?')), ); }); }} ```Reacted by Muhammad Imanudin and José
- addedp: firebase_authObsolete - The Firebase Auth pluginObsolete - The Firebase Auth plugin
on Jan 7, 2019 Hey, I was struggling with this since yesterday, fortunately I checked out the given methods by the FirebaseUser class instead of the FirebaseAuth class, I found a method for sending verification email.
fireBaseUser.sendEmailVerification();Reacted by Joshua Cold and Somtochukwu NwagbataReacted by Brent Williams and Felix SalazarAre there plans to implement this: https://firebase.google.com/docs/auth/admin/email-action-links? As of now, we only have a generic default method and it provides no room for customization.
It would be nice to port the following which is part of Android SDK
String link = FirebaseAuth.getInstance().generateEmailVerificationLink( email, actionCodeSettings);to Flutter.
Any update on this? Flutter still doesn't seem to expose a way to access actionCodeSettings?
This issue has been moved to firebase/flutterfire#957. Any further collaboration will be done there.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 27, 2021 - addedpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
on Jul 5, 2023
Hi everyone,
Is there any way to implement forgot password and sending verification mail through firebase in flutter.