()
| 113 | } |
| 114 | |
| 115 | function sendPasswordReset() { |
| 116 | const email = emailInput.value; |
| 117 | sendPasswordResetEmail(auth, email) |
| 118 | .then(function () { |
| 119 | // Password Reset Email Sent! |
| 120 | alert('Password Reset Email Sent!'); |
| 121 | }) |
| 122 | .catch(function (error) { |
| 123 | // Handle Errors here. |
| 124 | const errorCode = error.code; |
| 125 | const errorMessage = error.message; |
| 126 | if (errorCode == 'auth/invalid-email') { |
| 127 | alert(errorMessage); |
| 128 | } else if (errorCode == 'auth/user-not-found') { |
| 129 | alert(errorMessage); |
| 130 | } |
| 131 | console.log(error); |
| 132 | }); |
| 133 | } |
| 134 | |
| 135 | // Listening for auth state changes. |
| 136 | onAuthStateChanged(auth, function (user) { |
nothing calls this directly
no outgoing calls
no test coverage detected