mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: callback will jump to blank page when from param start with "http" (#2778)
This commit is contained in:
@ -707,6 +707,15 @@ export function goToLinkSoft(ths, link) {
|
|||||||
ths.props.history.push(link);
|
ths.props.history.push(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function goToLinkSoftOrJumpSelf(ths, link) {
|
||||||
|
if (link.startsWith("http")) {
|
||||||
|
goToLink(link);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ths.props.history.push(link);
|
||||||
|
}
|
||||||
|
|
||||||
export function showMessage(type, text) {
|
export function showMessage(type, text) {
|
||||||
if (type === "success") {
|
if (type === "success") {
|
||||||
message.success(text);
|
message.success(text);
|
||||||
|
@ -172,7 +172,7 @@ class AuthCallback extends React.Component {
|
|||||||
Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}${responseType}=${token}&state=${oAuthParams.state}&token_type=bearer`);
|
Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}${responseType}=${token}&state=${oAuthParams.state}&token_type=bearer`);
|
||||||
} else if (responseType === "link") {
|
} else if (responseType === "link") {
|
||||||
const from = innerParams.get("from");
|
const from = innerParams.get("from");
|
||||||
Setting.goToLinkSoft(this, from);
|
Setting.goToLinkSoftOrJumpSelf(this, from);
|
||||||
} else if (responseType === "saml") {
|
} else if (responseType === "saml") {
|
||||||
if (res.data2.method === "POST") {
|
if (res.data2.method === "POST") {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
Reference in New Issue
Block a user