firebase / snippets-web

Web snippets for firebase.google.com
Apache License 2.0
736 stars 241 forks source link

Update Password : getASecureRandomPassword is not defined #363

Open NinoMichael opened 6 months ago

NinoMichael commented 6 months ago

Hello, this code for updating password is not working to my JavaScript app. It always send that "getASecureRandomPassword" is not defined. Here is the code :

    const user = auth.currentUser;
    const newPassword = getASecureRandomPassword();

    updatePassword(user, newPassword)
    .then(function() {
      // Update successful.
    }).catch(function(error) {
      // An error happened.
    });