change(ui): iframe check and sso redirect
This commit is contained in:
parent
17055eb2ae
commit
75383e6d50
1 changed files with 2 additions and 2 deletions
|
|
@ -65,12 +65,12 @@ const Login: React.FC<LoginProps> = ({errors, loading, authDetails, login, setJw
|
|||
};
|
||||
|
||||
const onSSOClick = () => {
|
||||
if (params.get('iframe')) {
|
||||
if (window !== window.top) { // if in iframe
|
||||
window.parent.location.href = `${window.location.origin}/api/sso/saml2?iFrame=true`;
|
||||
} else {
|
||||
window.location.href = `${window.location.origin}/api/sso/saml2`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center h-screen">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue