diff --git a/internal/auth/repository/eventsourcing/eventstore/auth_request.go b/internal/auth/repository/eventsourcing/eventstore/auth_request.go index 763d36f45f..8dbf19455f 100644 --- a/internal/auth/repository/eventsourcing/eventstore/auth_request.go +++ b/internal/auth/repository/eventsourcing/eventstore/auth_request.go @@ -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) {