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

This commit is contained in:
Livio Spring
2023-10-09 18:05:25 +03:00
committed by GitHub
parent 6ce11a416a
commit 8549dd7a3d

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) {