fix: UI should automatically retrigger SSO login after token expiration (#6309)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
This commit is contained in:
Alexander Matyushentsev 2021-05-24 10:50:47 -07:00 committed by GitHub
parent 857d448a5c
commit ffb22ff1ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,8 +57,8 @@ const versionLoader = services.version.version();
async function isExpiredSSO() {
try {
const {loggedIn, iss} = await services.users.get();
if (loggedIn && iss !== 'argocd') {
const {iss} = await services.users.get();
if (iss && iss !== 'argocd') {
const authSettings = await services.authService.settings();
return ((authSettings.dexConfig && authSettings.dexConfig.connectors) || []).length > 0 || authSettings.oidcConfig;
}