AuthInfo: No mandatory auth_id in Auth Info service (#81335)

* fix auth info update not having mandatory auth_id

* remove uneeded newline
This commit is contained in:
Jo
2024-01-26 11:54:00 +01:00
committed by GitHub
parent 29e8a355cb
commit f3f36e37fa
3 changed files with 41 additions and 30 deletions

View File

@@ -147,6 +147,11 @@ func (c *OAuth) Authenticate(ctx context.Context, r *authn.Request) (*authn.Iden
return nil, errOAuthUserInfo.Errorf("failed to get user info: %w", err)
}
// Implement in Grafana 11
// if userInfo.Id == "" {
// return nil, errors.New("idP did not return a user id")
// }
if userInfo.Email == "" {
return nil, errOAuthMissingRequiredEmail.Errorf("required attribute email was not provided")
}