tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fedcm-auto-reauthn-without-approved-clients.https.html (1261B)


      1 <!DOCTYPE html>
      2 <title>Federated Credential Management API auto reauthentication without approved client.</title>
      3 <link rel="help" href="https://fedidcg.github.io/FedCM">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 
      9 <script type="module">
     10 import {request_options_with_mediation_optional,
     11        fedcm_test,
     12        select_manifest,
     13        fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js';
     14 
     15 fedcm_test(async t => {
     16  let test_options = request_options_with_mediation_optional(
     17      "manifest_with_single_account.json");
     18  test_options.identity.providers[0].clientId = 'nomatch';
     19  await select_manifest(t, test_options);
     20 
     21  // Signs in john_doe so that they will be a returning user
     22  let cred = await fedcm_get_and_select_first_account(t, test_options);
     23  assert_equals(cred.token, "account_id=john_doe");
     24 
     25  test_options.mediation = 'silent';
     26  cred = navigator.credentials.get(test_options);
     27  return promise_rejects_dom(t, 'NetworkError', cred);
     28 }, "Test that if the clientId is missing from approved_clients then auto\
     29 reauthentication cannot occur.");
     30 </script>