[WEB-5907] fix: magic code sign-in at Space app. #8552

This commit is contained in:
Vamsi Krishna 2026-01-19 20:41:00 +05:30 committed by GitHub
parent fa1b4a102a
commit f783447796
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -98,7 +98,7 @@ export const AuthRoot = observer(function AuthRoot() {
}
if (currentAuthMode === EAuthModes.SIGN_IN) {
if (response.is_password_autoset && isSMTPConfigured && isMagicLoginEnabled) {
if (isSMTPConfigured && isMagicLoginEnabled && response.status === "MAGIC_CODE") {
setAuthStep(EAuthSteps.UNIQUE_CODE);
generateEmailUniqueCode(data.email);
} else if (isEmailPasswordEnabled) {
@ -109,7 +109,7 @@ export const AuthRoot = observer(function AuthRoot() {
setErrorInfo(errorhandler);
}
} else {
if (isSMTPConfigured && isMagicLoginEnabled) {
if (isSMTPConfigured && isMagicLoginEnabled && response.status === "MAGIC_CODE") {
setAuthStep(EAuthSteps.UNIQUE_CODE);
generateEmailUniqueCode(data.email);
} else if (isEmailPasswordEnabled) {
@ -119,6 +119,7 @@ export const AuthRoot = observer(function AuthRoot() {
setErrorInfo(errorhandler);
}
}
return;
})
.catch((error) => {
const errorhandler = authErrorHandler(error?.error_code?.toString(), data?.email || undefined);

View file

@ -19,6 +19,7 @@ export interface IEmailCheckData {
}
export interface IEmailCheckResponse {
status: "MAGIC_CODE" | "CREDENTIAL";
is_password_autoset: boolean;
existing: boolean;
}