Skip to content

Commit

Permalink
chore: log redirect url in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
lsjostro committed Aug 29, 2024
1 parent a712d17 commit 9c256a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion authz/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ func (s *Service) authProcess(ctx context.Context, req *auth.AttributeContext_Ht
// and request against the idp will be retried, which means less
// confusing for the user.
if strings.HasPrefix(err.Error(), `oauth2: "invalid_grant"`) {
slog.Error("Invalid grant", slog.String("url", requestedURL), slog.String("err", err.Error()))
slog.Error("Invalid grant",
slog.String("err", err.Error()),
slog.String("url", requestedURL),
slog.String("redirect_url", sessionData.GetRequestedUrl()),
)
} else {
return nil, err
}
Expand Down

0 comments on commit 9c256a2

Please sign in to comment.