MCPcopy Index your code
hub / github.com/firebase/quickstart-js / passwordSignIn

Function passwordSignIn

auth/mfa-password.ts:112–129  ·  view source on GitHub ↗

* Signs in the user with email and password.

()

Source from the content-addressed store, hash-verified

110 * Signs in the user with email and password.
111 */
112function 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.

Callers

nothing calls this directly

Calls 3

alertMessageFunction · 0.85
showMfaDialogFunction · 0.85
displayErrorFunction · 0.85

Tested by

no test coverage detected