From 8549dd7a3d73f170937f231b9afffb4a98880abe Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Mon, 9 Oct 2023 18:05:25 +0300 Subject: [PATCH] fix(login): error case for unknown usernames correctly (#6689) --- .../repository/eventsourcing/eventstore/auth_request.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) {