Skip to content

Commit 986a7d1

Browse files
feat(universal-login): redirect cluster url's to cloud url after session invalidated (#5709)
1 parent 213b037 commit 986a7d1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/onboarding/containers/LoginPage.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import {fetchLegacyIdentity} from 'src/identity/apis/auth'
1717
// Components
1818
import ErrorBoundary from 'src/shared/components/ErrorBoundary'
1919
import LoginPageContents from 'src/onboarding/containers/LoginPageContents'
20+
import {CLOUD, CLOUD_QUARTZ_URL} from 'src/shared/constants'
21+
import {isFlagEnabled} from '../../shared/utils/featureFlag'
2022

2123
const EMPTY_HISTORY_STACK_LENGTH = 2
2224

@@ -46,6 +48,16 @@ export const LoginPage: FC = () => {
4648
history.goBack()
4749
}
4850
return null
51+
} else {
52+
if (isFlagEnabled('universalLogin')) {
53+
if (CLOUD) {
54+
const url = new URL(`${CLOUD_QUARTZ_URL}`).href
55+
56+
console.warn('Redirect to cloud url: ', url)
57+
window.location.replace(url)
58+
return
59+
}
60+
}
4961
}
5062

5163
return (

0 commit comments

Comments
 (0)