@@ -58,7 +58,7 @@ WebAuthn.prototype._registerCallback = function(publicKey, callback) {
5858 rawId : this . _bufferEncode ( publicKey . rawId ) ,
5959 response : {
6060 /** @see https://www.w3.org/TR/webauthn/#authenticatorattestationresponse */
61- clientDataJSON : this . _bufferEncode ( publicKey . response . clientDataJSON ) ,
61+ clientDataJSON : this . _bufferEncode ( publicKey . response . clientDataJSON ) . replace ( / = / g , '' ) ,
6262 attestationObject : this . _bufferEncode ( publicKey . response . attestationObject )
6363 }
6464 } ;
@@ -103,8 +103,8 @@ WebAuthn.prototype._signCallback = function(publicKey, callback) {
103103 rawId : this . _bufferEncode ( publicKey . rawId ) ,
104104 response : {
105105 /** @see https://www.w3.org/TR/webauthn/#iface-authenticatorassertionresponse */
106- authenticatorData : this . _bufferEncode ( publicKey . response . authenticatorData ) ,
107- clientDataJSON : this . _bufferEncode ( publicKey . response . clientDataJSON ) ,
106+ authenticatorData : this . _bufferEncode ( publicKey . response . authenticatorData ) . replace ( / = / g , '' ) ,
107+ clientDataJSON : this . _bufferEncode ( publicKey . response . clientDataJSON ) . replace ( / = / g , '' ) ,
108108 signature : this . _bufferEncode ( publicKey . response . signature ) ,
109109 userHandle : ( publicKey . response . userHandle ? this . _bufferEncode ( publicKey . response . userHandle ) : null ) ,
110110 }
@@ -130,7 +130,7 @@ WebAuthn.prototype._bufferEncode = function(value) {
130130 * @return {string }
131131 */
132132WebAuthn . prototype . _bufferDecode = function ( value ) {
133- var t = window . atob ( value )
133+ var t = window . atob ( value ) ;
134134 return Uint8Array . from ( t , c => c . charCodeAt ( 0 ) ) ;
135135}
136136
0 commit comments