lfedcm-identity.provider-delete.sub.html (707B)
1 <!doctype html> 2 <head> 3 <title>Helper to delete 'identity' credentials for discovery</title> 4 </head> 5 <script> 6 'use strict'; 7 8 // we delete a credential by storing a credential with the same ID but 9 // that is effective for no use. There isn't a native delete in the 10 // credential manager, so this is how it must be done 11 async function deleteCredentials() { 12 const queryString = window.location.search; 13 const params = new URLSearchParams(queryString); 14 let identityData = { 15 id: params.get("id"), 16 } 17 await navigator.credentials.store(await navigator.credentials.create({ 18 identity: identityData 19 })); 20 } 21 22 deleteCredentials().then(() => { 23 window.opener.postMessage("deleted", "*"); 24 }) 25 26 27 </script>