File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
packages/server/src/registration Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -275,16 +275,15 @@ export async function verifyRegistrationResponse(
275275 throw new Error ( `Unsupported Attestation Format: ${ fmt } ` ) ;
276276 }
277277
278- const toReturn : VerifiedRegistrationResponse = {
279- verified,
280- } ;
278+ if ( ! verified ) {
279+ return { verified : false } ;
280+ }
281281
282- if ( toReturn . verified ) {
283- const { credentialDeviceType, credentialBackedUp } = parseBackupFlags (
284- flags ,
285- ) ;
282+ const { credentialDeviceType, credentialBackedUp } = parseBackupFlags ( flags ) ;
286283
287- toReturn . registrationInfo = {
284+ return {
285+ verified : true ,
286+ registrationInfo : {
288287 fmt,
289288 aaguid : convertAAGUIDToString ( aaguid ) ,
290289 credentialType,
@@ -301,10 +300,8 @@ export async function verifyRegistrationResponse(
301300 origin : clientDataJSON . origin ,
302301 rpID : matchedRPID ,
303302 authenticatorExtensionResults : extensionsData ,
304- } ;
305- }
306-
307- return toReturn ;
303+ } ,
304+ } ;
308305}
309306
310307/**
You can’t perform that action at this time.
0 commit comments