mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
chore: Revert "feat: restrict redirectUrls for CAS login" (#2234)
This reverts commit b7a37126ad
.
This commit is contained in:
@ -173,12 +173,7 @@ class LoginPage extends React.Component {
|
||||
this.onUpdateApplication(res.data);
|
||||
});
|
||||
} else {
|
||||
let redirectUri = "";
|
||||
if (this.state.type === "cas") {
|
||||
const casParams = Util.getCasParameters();
|
||||
redirectUri = casParams.service;
|
||||
}
|
||||
OrganizationBackend.getDefaultApplication("admin", this.state.owner, this.state.type, redirectUri)
|
||||
OrganizationBackend.getDefaultApplication("admin", this.state.owner)
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
const application = res.data;
|
||||
@ -188,9 +183,9 @@ class LoginPage extends React.Component {
|
||||
});
|
||||
} else {
|
||||
this.onUpdateApplication(null);
|
||||
this.setState({
|
||||
msg: res.msg,
|
||||
});
|
||||
Setting.showMessage("error", res.msg);
|
||||
|
||||
this.props.history.push("/404");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -70,8 +70,8 @@ export function deleteOrganization(organization) {
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getDefaultApplication(owner, name, type = "", redirectUri = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-default-application?id=${owner}/${encodeURIComponent(name)}&type=${type}&redirectUri=${redirectUri}`, {
|
||||
export function getDefaultApplication(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-default-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user