Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@simplewebauthn/browser

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@simplewebauthn/browser - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

4

dist/simplewebauthn-browser.min.js

@@ -1,3 +0,3 @@

// [@webauthentine/browser] Version: 0.3.0 - Tuesday, May 26th, 2020, 3:08:04 PM
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SimpleWebAuthnBrowser=t():e.SimpleWebAuthnBrowser=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return void 0!==(null===window||void 0===window?void 0:window.PublicKeyCredential)&&"function"==typeof window.PublicKeyCredential}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Uint8Array.from(e,e=>e.charCodeAt(0))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3));t.default=function(e){return o.default.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_")}},function(e,t,r){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=s(e),a=n[0],i=n[1],l=new u(function(e,t,r){return 3*(t+r)/4-r}(0,a,i)),c=0,d=i>0?a-4:a;for(r=0;r<d;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===i&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===i&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,u=[],a=0,i=r-o;a<i;a+=16383)u.push(c(e,a,a+16383>i?i:a+16383));1===o?(t=e[r-1],u.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],u.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return u.join("")};for(var n=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,l=a.length;i<l;++i)n[i]=a[i],o[a.charCodeAt(i)]=i;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var o,u,a=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),a.push(n[(u=o)>>18&63]+n[u>>12&63]+n[u>>6&63]+n[63&u]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3));t.default=function(e){const{id:t}=e,r=4-t.length%4,n=t.padEnd(t.length+r,"=");return{...e,id:o.default.toByteArray(n)}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.supportsWebauthn=t.startAssertion=t.startAttestation=void 0;const o=n(r(6));t.startAttestation=o.default;const u=n(r(7));t.startAssertion=u.default;const a=n(r(0));t.supportsWebauthn=a.default},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1)),u=n(r(2)),a=n(r(0)),i=n(r(4));t.default=async function(e){if(!a.default())throw new Error("WebAuthn is not supported in this browser");const t={...e.publicKey,challenge:o.default(e.publicKey.challenge),user:{...e.publicKey.user,id:o.default(e.publicKey.user.id)},excludeCredentials:e.publicKey.excludeCredentials.map(i.default)},r=await navigator.credentials.create({publicKey:t});if(!r)throw new Error("Attestation was not completed");const{response:n}=r;return{base64AttestationObject:u.default(n.attestationObject),base64ClientDataJSON:u.default(n.clientDataJSON)}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1)),u=n(r(2)),a=n(r(0)),i=n(r(4));t.default=async function(e){if(!a.default())throw new Error("WebAuthn is not supported in this browser");const t={...e.publicKey,challenge:o.default(e.publicKey.challenge),allowCredentials:e.publicKey.allowCredentials.map(i.default)},r=await navigator.credentials.get({publicKey:t});if(!r)throw new Error("Assertion was not completed");const{response:n}=r;let l=void 0;return n.userHandle&&(l=u.default(n.userHandle)),{base64CredentialID:r.id,base64AuthenticatorData:u.default(n.authenticatorData),base64ClientDataJSON:u.default(n.clientDataJSON),base64Signature:u.default(n.signature),base64UserHandle:l}}}])}));
// [@webauthentine/browser] Version: 0.4.0 - Tuesday, May 26th, 2020, 10:39:23 PM
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SimpleWebAuthnBrowser=t():e.SimpleWebAuthnBrowser=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return void 0!==(null===window||void 0===window?void 0:window.PublicKeyCredential)&&"function"==typeof window.PublicKeyCredential}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Uint8Array.from(e,e=>e.charCodeAt(0))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3));t.default=function(e){return o.default.fromByteArray(new Uint8Array(e)).replace(/\+/g,"-").replace(/\//g,"_")}},function(e,t,r){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=s(e),a=n[0],i=n[1],l=new u(function(e,t,r){return 3*(t+r)/4-r}(0,a,i)),d=0,f=i>0?a-4:a;for(r=0;r<f;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===i&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,l[d++]=255&t);1===i&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,u=[],a=0,i=r-o;a<i;a+=16383)u.push(d(e,a,a+16383>i?i:a+16383));1===o?(t=e[r-1],u.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],u.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return u.join("")};for(var n=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,l=a.length;i<l;++i)n[i]=a[i],o[a.charCodeAt(i)]=i;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function d(e,t,r){for(var o,u,a=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),a.push(n[(u=o)>>18&63]+n[u>>12&63]+n[u>>6&63]+n[63&u]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(3));t.default=function(e){const{id:t}=e,r=4-t.length%4,n=t.padEnd(t.length+r,"=");return{...e,id:o.default.toByteArray(n)}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.supportsWebauthn=t.startAssertion=t.startAttestation=void 0;const o=n(r(6));t.startAttestation=o.default;const u=n(r(7));t.startAssertion=u.default;const a=n(r(0));t.supportsWebauthn=a.default},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1)),u=n(r(2)),a=n(r(0)),i=n(r(4));t.default=async function(e){if(!a.default())throw new Error("WebAuthn is not supported in this browser");const t={...e,challenge:o.default(e.challenge),user:{...e.user,id:o.default(e.user.id)},excludeCredentials:e.excludeCredentials.map(i.default)},r=await navigator.credentials.create({publicKey:t});if(!r)throw new Error("Attestation was not completed");const{response:n}=r;return{base64AttestationObject:u.default(n.attestationObject),base64ClientDataJSON:u.default(n.clientDataJSON)}}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(r(1)),u=n(r(2)),a=n(r(0)),i=n(r(4));t.default=async function(e){if(!a.default())throw new Error("WebAuthn is not supported in this browser");const t={...e,challenge:o.default(e.challenge),allowCredentials:e.allowCredentials.map(i.default)},r=await navigator.credentials.get({publicKey:t});if(!r)throw new Error("Assertion was not completed");const{response:n}=r;let l=void 0;return n.userHandle&&(l=u.default(n.userHandle)),{base64CredentialID:r.id,base64AuthenticatorData:u.default(n.authenticatorData),base64ClientDataJSON:u.default(n.clientDataJSON),base64Signature:u.default(n.signature),base64UserHandle:l}}}])}));
//# sourceMappingURL=simplewebauthn-browser.min.js.map
{
"name": "@simplewebauthn/browser",
"version": "0.3.0",
"version": "0.4.0",
"description": "SimpleWebAuthn for Browsers",

@@ -29,3 +29,3 @@ "main": "dist/simplewebauthn-browser.min.js",

"devDependencies": {
"@simplewebauthn/typescript-types": "^0.3.0",
"@simplewebauthn/typescript-types": "^0.4.0",
"@types/base64-js": "^1.2.5",

@@ -37,3 +37,3 @@ "ts-loader": "^7.0.4",

},
"gitHead": "0c4a5f127cc66456a7f17c77926ce671e3535d43"
"gitHead": "edca8a8ba7014118db5d4687e6069dbbc7be3e56"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc