Skip to content

Commit 81d41f3

Browse files
authored
fix: redirect to Quartz login upon session expiration (#4686)
1 parent bdaf97f commit 81d41f3

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/Signin.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,26 @@ export class Signin extends PureComponent<Props, State> {
112112
} = this.props
113113

114114
clearInterval(this.intervalID)
115-
/**
116-
* We'll need this authSessionCookieOn flag off for tools until
117-
* Quartz is integrated into that environment
118-
*/
119-
if (CLOUD && isFlagEnabled('authSessionCookieOn')) {
120-
const url = new URL(
121-
`${window.location.origin}${CLOUD_LOGIN_PATHNAME}?redirectTo=${window.location.href}`
122-
)
123-
setToLocalStorage('redirectTo', window.location.href)
124-
window.location.href = url.href
125-
throw error
126-
}
127115

128116
if (CLOUD) {
117+
if (isFlagEnabled('useQuartzLogin')) {
118+
window.location.reload()
119+
return
120+
}
121+
122+
/**
123+
* We'll need this authSessionCookieOn flag off for tools until
124+
* Quartz is integrated into that environment
125+
*/
126+
if (isFlagEnabled('authSessionCookieOn')) {
127+
const url = new URL(
128+
`${window.location.origin}${CLOUD_LOGIN_PATHNAME}?redirectTo=${window.location.href}`
129+
)
130+
setToLocalStorage('redirectTo', window.location.href)
131+
window.location.href = url.href
132+
throw error
133+
}
134+
129135
const url = new URL(
130136
`${window.location.origin}${CLOUD_SIGNIN_PATHNAME}?redirectTo=${window.location.href}`
131137
)

0 commit comments

Comments
 (0)