Skip to content

Commit

Permalink
Revert "feat: detect email_change_not_allowed earlier to fix tests"
Browse files Browse the repository at this point in the history
This reverts commit 47df0a2.
  • Loading branch information
porcellus committed Sep 30, 2024
1 parent 47df0a2 commit a88d3a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions lib/build/recipe/thirdparty/api/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,6 @@ function getAPIInterface() {
shouldTryLinkingWithSessionUser: input.shouldTryLinkingWithSessionUser,
});
if (preAuthChecks.status !== "OK") {
if (
preAuthChecks.status === "SIGN_IN_NOT_ALLOWED" &&
authenticatingUser !== undefined &&
!authenticatingUser.loginMethod.hasSameEmailAs(emailInfo.id)
) {
return {
status: "SIGN_IN_UP_NOT_ALLOWED",
reason:
"Cannot sign in / up because new email cannot be applied to existing account. Please contact support. (ERR_CODE_005)",
};
}
logger_1.logDebugMessage(
"signInUpPOST: erroring out because preAuthChecks returned " + preAuthChecks.status
);
Expand Down
11 changes: 0 additions & 11 deletions lib/ts/recipe/thirdparty/api/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,6 @@ export default function getAPIInterface(): APIInterface {
});

if (preAuthChecks.status !== "OK") {
if (
preAuthChecks.status === "SIGN_IN_NOT_ALLOWED" &&
authenticatingUser !== undefined &&
!authenticatingUser.loginMethod.hasSameEmailAs(emailInfo.id)
) {
return {
status: "SIGN_IN_UP_NOT_ALLOWED",
reason:
"Cannot sign in / up because new email cannot be applied to existing account. Please contact support. (ERR_CODE_005)",
};
}
logDebugMessage("signInUpPOST: erroring out because preAuthChecks returned " + preAuthChecks.status);
// On the frontend, this should show a UI of asking the user
// to login using a different method.
Expand Down

0 comments on commit a88d3a9

Please sign in to comment.