fix(login): error case for unknown usernames correctly (#6689)

(cherry picked from commit 8549dd7a3d)
This commit is contained in:
Livio Spring 2023-10-09 18:05:25 +03:00
parent 3689624232
commit 907a1611ac
No known key found for this signature in database
GPG Key ID: 26BB1C2FA5952CF0

View File

@ -756,9 +756,9 @@ func (repo *AuthRequestRepo) checkLoginName(ctx context.Context, request *domain
}
// the user was either not found or not active
// so check if the loginname suffix matches a verified org domain
ok, err := repo.checkDomainDiscovery(ctx, request, loginName)
if err != nil || ok {
return err
ok, errDomainDiscovery := repo.checkDomainDiscovery(ctx, request, loginName)
if errDomainDiscovery != nil || ok {
return errDomainDiscovery
}
// let's once again check if the user was just inactive
if user != nil && user.State == int32(domain.UserStateInactive) {