* Updates the second factor dropdown options for sign-in. * @param {!Array<!MultiFactorInfo>} hints The sign-in * second factor hints.
(hints: MultiFactorInfo[])
| 314 | * second factor hints. |
| 315 | */ |
| 316 | function 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. |