Skip to content

Commit

Permalink
Fixed Edge cryptto bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lboyette-okta committed Oct 25, 2016
1 parent 1a51f98 commit ee24904
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
var util = require('./util');

function verifyToken(idToken, key) {
key = util.clone(key);

var format = 'jwk';
var algo = {
name: 'RSASSA-PKCS1-v1_5',
Expand All @@ -21,6 +23,9 @@ function verifyToken(idToken, key) {
var extractable = true;
var usages = ['verify'];

// https://connect.microsoft.com/IE/feedback/details/2242108/webcryptoapi-importing-jwk-with-use-field-fails
delete key.use;

return crypto.subtle.importKey(
format,
key,
Expand Down

0 comments on commit ee24904

Please sign in to comment.