Skip to content

Commit

Permalink
fix email changes
Browse files Browse the repository at this point in the history
  • Loading branch information
niftyvictor committed Feb 6, 2025
1 parent 276769f commit 310a5f8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/ts/recipe/webauthn/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ export default function getRecipeInterface(

const user = result.user as User;
// todo this might be wrong but will have to figure out - what happens when there are multiple webauthn login methods ?
const parsedEmail = user.loginMethods.find((lm) => lm.recipeId === "webauthn")?.email;
if (!parsedEmail) {
return {
status: "RECOVER_ACCOUNT_TOKEN_INVALID_ERROR",
};
}
email = parsedEmail;
email = user.loginMethods.find((lm) => lm.recipeId === "webauthn")?.email;
}

if (!email) {
Expand Down

0 comments on commit 310a5f8

Please sign in to comment.