Skip to content

Is there any way to implement forgot password and send verification mail firebase #12459

Description

@vuppalasivakumar

Hi everyone,
Is there any way to implement forgot password and sending verification mail through firebase in flutter.

Activity

  1. Hixie commented on Oct 10, 2017

    @Hixie
    Contributor
  2. added this to the milestone on Oct 10, 2017
  3. FastNinja commented on Jan 28, 2018

    @FastNinja

    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 that forget password functionality is sort of essentials in any serious app experience.

  4. dericcain commented on Feb 1, 2018

    @dericcain

    I 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.

  5. Arno-Z commented on Mar 6, 2018

    @Arno-Z

    @dericgw Would you consider sharing the FCF's you used for this here?

    Thanks!

  6. dericcain commented on Mar 8, 2018

    @dericcain

    @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,
          });
        });
    })
  7. Arno-Z commented on Mar 8, 2018

    @Arno-Z
  8. FastNinja commented on Mar 10, 2018

    @FastNinja

    Hi all,

    the Flutter Plugin was updated - so you can send reset password link just cal:
    sendPasswordResetEmail from FirebaseAuth.

    The issue can be closed as done.

  9. brusinovic commented on Mar 19, 2018

    @brusinovic

    I wouldn't call it done yet? SendPasswordResetEmail is implemented but sending account verification email message is still missing.

  10. tuancaraballo commented on Oct 2, 2018

    @tuancaraballo

    Any updates on this? Flutter hasn't worked for me. Happy to open a pr.

  11. zoechi commented on Oct 3, 2018

    @zoechi
    Contributor

    @tuancaraballo doesn't seem to be a PR waiting yet, so a PR from you would be welcome.

  12. Arno-Z commented on Oct 9, 2018

    @Arno-Z
  13. NotConquerer commented on Feb 5, 2019

    @NotConquerer

    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();

  14. AmitJoki commented on Mar 24, 2019

    @AmitJoki

    Are 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.

  15. willvlad commented on May 30, 2019

    @willvlad

    Any update on this? Flutter still doesn't seem to expose a way to access actionCodeSettings?

  16. kroikie commented on Oct 13, 2019

    @kroikie

    @vuppalasivakumar

    This issue has been moved to firebase/flutterfire#957. Any further collaboration will be done there.

  17. github-actions commented on Aug 27, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityp: firebaseObsolete - Firebase pluginsp: firebase_authObsolete - The Firebase Auth pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions