mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
Fix signup page silent bug for sign-up-without-prompt-items case.
This commit is contained in:
parent
bc5e748e5c
commit
e39c3b7613
@ -128,9 +128,7 @@ class LoginPage extends React.Component {
|
|||||||
Setting.goToLinkSoft(ths, `/prompt/${application.name}?redirectUri=${oAuthParams.redirectUri}&code=${code}&state=${oAuthParams.state}`);
|
Setting.goToLinkSoft(ths, `/prompt/${application.name}?redirectUri=${oAuthParams.redirectUri}&code=${code}&state=${oAuthParams.state}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (res.msg !== "Please sign in first") {
|
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
|
||||||
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -127,21 +127,23 @@ class SignupPage extends React.Component {
|
|||||||
AuthBackend.signup(values)
|
AuthBackend.signup(values)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 'ok') {
|
if (res.status === 'ok') {
|
||||||
AuthBackend.getAccount("")
|
if (Setting.hasPromptPage(application)) {
|
||||||
.then((res) => {
|
AuthBackend.getAccount("")
|
||||||
let account = null;
|
.then((res) => {
|
||||||
if (res.status === "ok") {
|
let account = null;
|
||||||
account = res.data;
|
if (res.status === "ok") {
|
||||||
account.organization = res.data2;
|
account = res.data;
|
||||||
|
account.organization = res.data2;
|
||||||
|
|
||||||
this.onUpdateAccount(account);
|
this.onUpdateAccount(account);
|
||||||
Setting.goToLinkSoft(this, this.getResultPath(application));
|
Setting.goToLinkSoft(this, this.getResultPath(application));
|
||||||
} else {
|
} else {
|
||||||
if (res.msg !== "Please sign in first") {
|
|
||||||
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
|
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
Setting.goToLinkSoft(this, this.getResultPath(application));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Setting.showMessage("error", i18next.t(`signup:${res.msg}`));
|
Setting.showMessage("error", i18next.t(`signup:${res.msg}`));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user