@@ -463,25 +463,25 @@ export default class Wrapper {
463463 return Webauthn . getInstanceOrThrow ( ) . webJSRecipe . removeCredential ( input ) ;
464464 }
465465
466- static registerCredentialWithUser ( input : {
466+ static createAndRegisterCredentialForSessionUser ( input : {
467467 recipeUserId : string ;
468468 email : string ;
469469 options ?: RecipeFunctionOptions ;
470470 userContext : any ;
471471 } ) : Promise <
472472 | { status : "OK" }
473473 | GeneralErrorResponse
474- | { status : "REGISTER_CREDENTIAL_NOT_ALLOWED" ; reason : string }
474+ | { status : "REGISTER_CREDENTIAL_NOT_ALLOWED" ; reason ? : string }
475475 | { status : "INVALID_EMAIL_ERROR" ; err : string }
476476 | { status : "INVALID_CREDENTIALS_ERROR" }
477477 | { status : "OPTIONS_NOT_FOUND_ERROR" }
478478 | { status : "INVALID_OPTIONS_ERROR" }
479- | { status : "INVALID_AUTHENTICATOR_ERROR" ; reason : string }
479+ | { status : "INVALID_AUTHENTICATOR_ERROR" ; reason ? : string }
480480 | { status : "AUTHENTICATOR_ALREADY_REGISTERED" }
481481 | { status : "FAILED_TO_REGISTER_USER" ; error : any }
482482 | { status : "WEBAUTHN_NOT_SUPPORTED" ; error : any }
483483 > {
484- return Webauthn . getInstanceOrThrow ( ) . webJSRecipe . registerCredentialWithUser ( input ) ;
484+ return Webauthn . getInstanceOrThrow ( ) . webJSRecipe . createAndRegisterCredentialForSessionUser ( input ) ;
485485 }
486486
487487 static registerCredential ( input : {
@@ -493,11 +493,11 @@ export default class Wrapper {
493493 } ) : Promise <
494494 | { status : "OK" }
495495 | GeneralErrorResponse
496- | { status : "REGISTER_CREDENTIAL_NOT_ALLOWED" ; reason : string }
496+ | { status : "REGISTER_CREDENTIAL_NOT_ALLOWED" ; reason ? : string }
497497 | { status : "INVALID_CREDENTIALS_ERROR" }
498498 | { status : "OPTIONS_NOT_FOUND_ERROR" }
499499 | { status : "INVALID_OPTIONS_ERROR" }
500- | { status : "INVALID_AUTHENTICATOR_ERROR" ; reason : string }
500+ | { status : "INVALID_AUTHENTICATOR_ERROR" ; reason ? : string }
501501 > {
502502 return Webauthn . getInstanceOrThrow ( ) . webJSRecipe . registerCredential ( input ) ;
503503 }
@@ -532,7 +532,7 @@ const authenticateCredential = Wrapper.authenticateCredential;
532532const registerCredentialWithSignUp = Wrapper . registerCredentialWithSignUp ;
533533const authenticateCredentialWithSignIn = Wrapper . authenticateCredentialWithSignIn ;
534534const registerCredentialWithRecoverAccount = Wrapper . registerCredentialWithRecoverAccount ;
535- const registerCredentialWithUser = Wrapper . registerCredentialWithUser ;
535+ const createAndRegisterCredentialForSessionUser = Wrapper . createAndRegisterCredentialForSessionUser ;
536536const listCredentials = Wrapper . listCredentials ;
537537const removeCredential = Wrapper . removeCredential ;
538538const registerCredential = Wrapper . registerCredential ;
@@ -553,7 +553,7 @@ export {
553553 registerCredentialWithSignUp ,
554554 authenticateCredentialWithSignIn ,
555555 registerCredentialWithRecoverAccount ,
556- registerCredentialWithUser ,
556+ createAndRegisterCredentialForSessionUser ,
557557 doesBrowserSupportWebAuthn ,
558558 WebauthnComponentsOverrideProvider ,
559559 listCredentials ,
0 commit comments