fix: handle missing parameters in external provider callback (#6158)

This commit is contained in:
Livio Spring 2023-07-07 21:04:55 +02:00 committed by GitHub
parent 6319fdda9e
commit 26d63cd233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -897,6 +897,10 @@ func (l *Login) appendUserGrants(ctx context.Context, userGrants []*domain.UserG
}
func (l *Login) externalAuthFailed(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, tokens *oidc.Tokens[*oidc.IDTokenClaims], user idp.User, err error) {
if authReq == nil {
l.renderLogin(w, r, authReq, err)
return
}
if _, _, actionErr := l.runPostExternalAuthenticationActions(&domain.ExternalUser{}, tokens, authReq, r, user, err); actionErr != nil {
logging.WithError(err).Error("both external user authentication and action post authentication failed")
}