W3C home > Mailing lists > Public > public-webauthn@w3.org > June 2018

[webauthn] Microsoft edge Webauthn APIs makecredential throws DOMException 9 (Not SupportedError)

From: pkuntal via GitHub <sysbot+gh@w3.org>
Date: Fri, 22 Jun 2018 09:55:15 +0000
To: public-webauthn@w3.org
Message-ID: <issues.opened-334817897-1529661314-sysbot+gh@w3.org>
pkuntal has just created a new issue for https://github.com/w3c/webauthn:

== Microsoft edge Webauthn APIs makecredential throws DOMException 9 (Not SupportedError) ==
I am using makeCredential API on Microsoft Edge but it keeps throwing NotSupportedError. Is there anything wrong with this piece of code : 

html page : 

<!DOCTYPE html>
<html>
<head>
<title>Web Authentication API Test</title>
<script>
function make() {
  var accountInfo = {
    rpDisplayName: 'Contoso', // Name of relying party
    userDisplayName: 'Pooja Kuntal' // Name of user account
  };
  var cryptoParameters = [
    {
      type: 'FIDO_2_0',
      algorithm: 'RSASSA-PKCS1-v1_5'
    }
  ];
  
  msCredentials.makeCredential(accountInfo, cryptoParameters)
  .then(function (result) {
    // for debugging
    document.getElementById('credID').value = result.id;
    document.getElementById('publicKey').value = JSON.stringify(result.publicKey);
    //alert(result.algorithm)
    //alert(result.attestation)
  }).catch(function (err) {
    alert('err: ' + err.message);
  });
}

function sign() {
  var credID = document.getElementById('credID').value;
  var filters = {
    accept:[
      {
        type: 'FIDO_2_0',
        id: credID
      }
    ]
  };
  msCredentials.getAssertion('challenge value', filters)
  .then(function(result) {
    //for debugging
    document.getElementById('signature').value = result.signature.signature;    
    document.getElementById('authnrdata').value = result.signature.authnrData;    
    document.getElementById('clientdata').value = result.signature.clientData;    
  }).catch(function (err) {
    alert('err: ' + err.message);
  });
}
</script>

</head>
<body>
<br>
  <button onclick="make()">Make</button>
  <button onclick="sign()">Sign</button>
 </br>
  

    <br>Credential ID:
	<input type="text" name="credID">
	</br>


    <br>Public Key:
	<input type="text" name="publicKey">
    </br>


    <br>Base64 Encoded Signature:
	<input type="text" name="signature">
	</br>

    <br>Base64 Encoded AuthnrData:
	<input type="text" name="authnrdata">
	</br>

    <br>
    Base64 Encoded ClientData:
	<input type="text" name="clientdata">
	</br>

  

</body>
</html>

Please view or discuss this issue at https://github.com/w3c/webauthn/issues/965 using your GitHub account
Received on Friday, 22 June 2018 09:55:18 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 07:26:33 UTC