diff --git a/web/src/Setting.js b/web/src/Setting.js index 18dbd778..462c5c81 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -707,6 +707,15 @@ export function goToLinkSoft(ths, 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) { if (type === "success") { message.success(text); diff --git a/web/src/auth/AuthCallback.js b/web/src/auth/AuthCallback.js index d72d9e7a..2f5a98f6 100644 --- a/web/src/auth/AuthCallback.js +++ b/web/src/auth/AuthCallback.js @@ -172,7 +172,7 @@ class AuthCallback extends React.Component { Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}${responseType}=${token}&state=${oAuthParams.state}&token_type=bearer`); } else if (responseType === "link") { const from = innerParams.get("from"); - Setting.goToLinkSoft(this, from); + Setting.goToLinkSoftOrJumpSelf(this, from); } else if (responseType === "saml") { if (res.data2.method === "POST") { this.setState({