* Signs in the user with email and password.
()
| 110 | * Signs in the user with email and password. |
| 111 | */ |
| 112 | function passwordSignIn() { |
| 113 | const email = emailInput.value; |
| 114 | const password = passwordInput.value; |
| 115 | // Sign in with email and password. |
| 116 | signInWithEmailAndPassword(auth, email, password) |
| 117 | .then(function () { |
| 118 | alertMessage('User signed in!'); |
| 119 | }) |
| 120 | .catch(function (error: any) { |
| 121 | // Handle second factor sign-in. |
| 122 | if (error.code === 'auth/multi-factor-auth-required') { |
| 123 | mfaResolver = getMultiFactorResolver(auth, error); |
| 124 | showMfaDialog(); |
| 125 | return; |
| 126 | } |
| 127 | displayError(error); |
| 128 | }); |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Creates a user with email and password. |
nothing calls this directly
no test coverage detected