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

Function updateMfaSignInHints

auth/mfa-password.ts:316–329  ·  view source on GitHub ↗

* Updates the second factor dropdown options for sign-in. * @param {!Array<!MultiFactorInfo>} hints The sign-in * second factor hints.

(hints: MultiFactorInfo[])

Source from the content-addressed store, hash-verified

314 * second factor hints.
315 */
316function updateMfaSignInHints(hints: MultiFactorInfo[]) {
317 // Clear the list.
318 mfaHints.innerHTML = '';
319 mfaHints.appendChild(document.createElement('option'));
320 hints.forEach(function (value, i) {
321 // Append entry to list.
322 const node = document.createElement('option');
323 node.setAttribute('data-val', i.toString());
324 // phoneNumber exsits on MultiFactorInfo, but is not typed
325 // @ts-ignore
326 node.textContent = value.phoneNumber ?? 'NO_PHONE_NUMBER';
327 mfaHints.appendChild(node);
328 });
329}
330
331/**
332 * Handles the multi-factor hints selection for sign-in.

Callers 1

updateMfaDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected