mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Fix bug in Casdoor's own 3rd-party login.
This commit is contained in:
@ -46,6 +46,11 @@ class AuthCallback extends React.Component {
|
||||
const method = innerParams.get("method");
|
||||
if (method === "signup") {
|
||||
const realRedirectUri = innerParams.get("redirect_uri");
|
||||
// Casdoor's own login page, so "code" is not necessary
|
||||
if (realRedirectUri === null) {
|
||||
return "login";
|
||||
}
|
||||
|
||||
const realRedirectUrl = new URL(realRedirectUri).origin;
|
||||
|
||||
// For Casdoor itself, we use "login" directly
|
||||
@ -85,7 +90,8 @@ class AuthCallback extends React.Component {
|
||||
const responseType = this.getResponseType();
|
||||
if (responseType === "login") {
|
||||
Util.showMessage("success", `Logged in successfully`);
|
||||
Setting.goToLinkSoft(this, "/");
|
||||
// Setting.goToLinkSoft(this, "/");
|
||||
Setting.goToLink("/");
|
||||
} else if (responseType === "code") {
|
||||
const code = res.data;
|
||||
Setting.goToLink(`${oAuthParams.redirectUri}?code=${code}&state=${oAuthParams.state}`);
|
||||
|
Reference in New Issue
Block a user