diff --git a/lib/ts/recipe/webauthn/recipeImplementation.ts b/lib/ts/recipe/webauthn/recipeImplementation.ts index 796be8130..870e414c9 100644 --- a/lib/ts/recipe/webauthn/recipeImplementation.ts +++ b/lib/ts/recipe/webauthn/recipeImplementation.ts @@ -311,7 +311,7 @@ export default function getRecipeInterface( return { ...resp, user: new User(resp.user), - recipeUserId: new RecipeUserId(resp.recipeUserId), + recipeUserId: resp.recipeUserId ? new RecipeUserId(resp.recipeUserId) : undefined, }; } diff --git a/lib/ts/recipe/webauthn/types.ts b/lib/ts/recipe/webauthn/types.ts index a25c86070..84b72c872 100644 --- a/lib/ts/recipe/webauthn/types.ts +++ b/lib/ts/recipe/webauthn/types.ts @@ -348,7 +348,9 @@ export type RecipeInterface = { token: string; tenantId: string; userContext: UserContext; - }): Promise<{ status: "OK"; user: User; recipeUserId: RecipeUserId } | GetUserFromRecoverAccountTokenErrorResponse>; + }): Promise< + { status: "OK"; user: User; recipeUserId?: RecipeUserId } | GetUserFromRecoverAccountTokenErrorResponse + >; removeCredential(input: { webauthnCredentialId: string;