Fix OAuth code exchange and go lint

Authorization-code exchange used ExternalClientID, which
is empty for registered clients and broke e2e token
grants. Pass the authenticated client's GID instead.

Also satisfy wsl_v5 blank-line rules, wire the delete
reference dialog through its mutation hook, and name the
filemanager logger.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-20 10:38:25 +02:00
parent 43ce3a7c53
commit 4b4e7ea1f8
7 changed files with 11 additions and 13 deletions

View File

@@ -61,6 +61,7 @@ func (r *mutationResolver) UpdateFullName(ctx context.Context, input types.Updat
}
r.logger.ErrorCtx(ctx, "cannot validate profile update", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
}
@@ -77,6 +78,7 @@ func (r *mutationResolver) UpdateFullName(ctx context.Context, input types.Updat
}
r.logger.ErrorCtx(ctx, "cannot update identity", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
@@ -87,6 +89,7 @@ func (r *mutationResolver) UpdateFullName(ctx context.Context, input types.Updat
}
r.logger.ErrorCtx(ctx, "cannot update profile", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
}

View File

@@ -60,6 +60,7 @@ func (h *OAuthInitiateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
compliancePage := complianceportal.CompliancePageFromContext(ctx)
portalBaseURL := complianceportal.CompliancePageBaseURLFromContext(ctx)
if compliancePage == nil || portalBaseURL == nil {
httpserver.RenderError(w, http.StatusNotFound, errNotFound)
return

View File

@@ -466,7 +466,7 @@ func (h *OAuth2Handler) handleAuthorizationCodeGrant(w http.ResponseWriter, r *h
result, err := h.iam.OAuth2ServerService.ExchangeAuthorizationCode(
r.Context(),
client.ExternalClientID,
client.ID.String(),
in.Code,
in.RedirectURI,
in.CodeVerifier,