Skip to content

Commit a145646

Browse files
authored
Merge pull request #600 from reubenmiller/fix-skip-sso-on-error
fix(set-session): skip sso login type on errors and try other login strategies
2 parents 17f731e + b048d6f commit a145646

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/c8ylogin/c8ylogin.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,8 @@ func (lh *LoginHandler) login() {
453453
continue
454454
}
455455

456-
// Check error type, and if the configuration can't be found, then skip SSO
457-
// add a new formal type to cover this scenario
458-
// could not get OpenID Connect configuration
459-
lh.state <- LoginStateAbort
460-
lh.Err = fmt.Errorf("OAuth2 device authorization flow failed. %w", loginErr)
461-
return lh.Err
456+
lh.Logger.Infof("Skipping login type (%s) as SSO login failed. err=%s", option.Type, loginErr)
457+
continue
462458
}
463459

464460
lh.Logger.Infof("Received access token via device flow. type=%s, scope=%s, tokenPresent=%v, refreshTokenPresent=%v", accessToken.Type, accessToken.Scope, accessToken.Token != "", accessToken.RefreshToken != "")

0 commit comments

Comments
 (0)