How to create a password for users who created already an account with Google Login - Firebase?

Viewed 15

In my nuxt project, users can create an account with google login also . But these users do not have a password . So users can ask creating a password also for their google login account. They don't have an old password so I must send new password to firebase for this changing.

Users should be able to change their passwords after logging into the system. firebase ver-9

     confirmPasswordReset(auth, actionCode, password)
            .then(resp => {
            
              // Password reset has been confirmed and new password updated.
              // TODO: Display a link back to the app, or sign-in the user directly
              // if the page belongs to the same domain as the app:
              // auth.signInWithEmailAndPassword(accountEmail, newPassword);
              // TODO: If a continue URL is available, display a button which on
              // click redirects the user back to the app via continueUrl with
              // additional state determined from that URL's parameters.
            })
            .catch(error => {
              console.log('err', error);
              // Error occurred during confirmation. The code might have expired or the
              // password is too weak.
            });

in here , I dont know how to obtain actionCode so I think that's why my code does not work

0 Answers
Related