Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created April 12, 2016 00:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kypflug/5931c40235331007705c2d9fd27c962b to your computer and use it in GitHub Desktop.
Save kypflug/5931c40235331007705c2d9fd27c962b to your computer and use it in GitHub Desktop.
var accountInfo = {
rpDisplayName: 'Contoso', // Name of relying party
userDisplayName: 'John Doe' // Name of user account in relying partying
};
var cryptoParameters = [
{
type: 'FIDO_2_0',
algorithm: 'RSASSA-PKCS1-v1_5'
}
];
window.msCredential.makeCredential(accountInfo, cryptoParameters)
.then(function (cred) {
// If promised succeeds, send credential information to the server
sendToServer({
credential: {type: 'ScopedCred', id: cred.id},
algorithm: cred.algorithm,
publicKey: JSON.parse(cred.publicKey),
attestation: cred.attestation
}
);
});
@nathancrank
Copy link

Shouldn't it be window.msCredentials not msCredential?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment