File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
webauthn-server-demo/src/main/webapp/js Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,9 @@ fetch(/* ... */) // Make the call that returns the credential
236
236
response: {
237
237
attestationObject: uint8arrayToBase64url(publicKeyCredential.response.attestationObject),
238
238
clientDataJSON: uint8arrayToBase64url(publicKeyCredential.response.clientDataJSON),
239
- transports: publicKeyCredential.response.getTransports() || [],
239
+
240
+ // Attempt to read transports, but recover gracefully if not supported by the browser
241
+ transports: publicKeyCredential.response.getTransports && publicKeyCredential.response.getTransports() || [],
240
242
},
241
243
242
244
// Warning: Client extension results could also contain binary data that needs encoding
Original file line number Diff line number Diff line change 141
141
response : {
142
142
attestationObject : base64url . fromByteArray ( response . response . attestationObject ) ,
143
143
clientDataJSON : base64url . fromByteArray ( response . response . clientDataJSON ) ,
144
- transports : response . response . getTransports ( ) || [ ] ,
144
+ transports : response . response . getTransports && response . response . getTransports ( ) || [ ] ,
145
145
} ,
146
146
clientExtensionResults,
147
147
} ;
You can’t perform that action at this time.
0 commit comments