[WEB-5907] fix: magic code sign-in at Space app. #8552
This commit is contained in:
parent
fa1b4a102a
commit
f783447796
2 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ export interface IEmailCheckData {
|
|||
}
|
||||
|
||||
export interface IEmailCheckResponse {
|
||||
status: "MAGIC_CODE" | "CREDENTIAL";
|
||||
is_password_autoset: boolean;
|
||||
existing: boolean;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue