Right now I am doing the following:
function resetPassword(email) {
/* The following is for the alert dialog box that is triggered when the user
presses forget password! */
Swal.fire({
title: 'Enter the email address',
input: 'text',
inputAttributes: {
autocapitalize: 'off'
},
showCancelButton: true,
confirmButtonText: 'Send Reset Email',
}).then((input) => {
firebase.auth().sendPasswordResetEmail(email)
.then(() => {
Swal.fire({
title: 'Email Sent!',
text: 'Check your email for a reset link!',
type: 'success',
confirmButtonText: 'Cool'
});
})
.catch((error) => {
Swal.fire({
title: 'Error!',
text: error.message,
type: 'error',
confirmButtonText: 'Cool'
});
});
});
}
But it is not working, what am I doing wrong?
My main outcome is to get the email, pass it through to firebase auth api, send the email, then put one more diag box out that says "done" basically. But the input is not coming through. Why is this?
Thanks in advance.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment