diff --git a/lib/build/recipe/passwordless/recipeImplementation.js b/lib/build/recipe/passwordless/recipeImplementation.js index 15e4e9238..d156a7e2e 100644 --- a/lib/build/recipe/passwordless/recipeImplementation.js +++ b/lib/build/recipe/passwordless/recipeImplementation.js @@ -37,12 +37,6 @@ function getRecipeInterface(querier) { logger_1.logDebugMessage("Passwordless.consumeCode code consumed OK"); response.user = new user_1.User(response.user); response.recipeUserId = new recipeUserId_1.default(response.recipeUserId); - if (response.status !== "OK") { - return response; - } - if (response.status !== "OK") { - return response; - } // Attempt account linking (this is a sign up) let updatedUser = response.user; const linkResult = await authUtils_1.AuthUtils.linkToSessionIfProvidedElseCreatePrimaryUserIdOrLinkByAccountInfo( @@ -58,9 +52,6 @@ function getRecipeInterface(querier) { return linkResult; } updatedUser = linkResult.user; - if (updatedUser === undefined) { - throw new Error("Should never come here."); - } response.user = updatedUser; return Object.assign(Object.assign({}, response), { consumedDevice: response.consumedDevice, diff --git a/lib/ts/recipe/passwordless/recipeImplementation.ts b/lib/ts/recipe/passwordless/recipeImplementation.ts index d157ce3b0..7f742fd51 100644 --- a/lib/ts/recipe/passwordless/recipeImplementation.ts +++ b/lib/ts/recipe/passwordless/recipeImplementation.ts @@ -40,14 +40,6 @@ export default function getRecipeInterface(querier: Querier): RecipeInterface { response.user = new User(response.user); response.recipeUserId = new RecipeUserId(response.recipeUserId); - if (response.status !== "OK") { - return response; - } - - if (response.status !== "OK") { - return response; - } - // Attempt account linking (this is a sign up) let updatedUser = response.user; @@ -64,10 +56,6 @@ export default function getRecipeInterface(querier: Querier): RecipeInterface { } updatedUser = linkResult.user; - if (updatedUser === undefined) { - throw new Error("Should never come here."); - } - response.user = updatedUser; return {