diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 264ad024..d10e3238 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -366,6 +366,7 @@ class LoginPage extends React.Component { } onFinish(values) { + this.setState({loginLoading: true}); if (this.state.loginMethod === "webAuthn") { let username = this.state.username; if (username === null || username === "") { @@ -425,7 +426,6 @@ class LoginPage extends React.Component { } login(values) { - this.setState({loginLoading: true}); // here we are supposed to determine whether Casdoor is working as an OAuth server or CAS server values["language"] = this.state.userLang ?? ""; if (this.state.type === "cas") { @@ -938,7 +938,7 @@ class LoginPage extends React.Component { this.login(values); this.setState({openCaptchaModal: false}); }} - onCancel={() => this.setState({openCaptchaModal: false})} + onCancel={() => this.setState({openCaptchaModal: false, loginLoading: false})} isCurrentProvider={true} />; }