Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure correct OpenID Connect error responses #16982

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Aug 29, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

This PR aligns the custom error responses from the auth parts of the Management and Delivery APIs with those of OpenIddict, which in turn are aligned with the OpenID Connect standard.

Testing this PR

Invalid auth requests should have responses that conform to the standard.

For example attempting to use an invalid client_id (this is a custom error response in MemberController):

image

....compared to using an invalid redirect_uri (this is a response from OpenIddict):

image

@kevinchalet
Copy link

JSYK, the plain-text errors returned by OpenIddict from user-visible endpoints like the authorization endpoint are not a standard thing: the only standard errors defined by the OAuth 2.0 RFC6749/6750 specifications are the ones returned in the WWW-Authenticate response headers (for API calls) or in JSON responses (e.g errored token responses).

The plain-text errors are really a fallback thing. For a much better UX, you may want to enable the status code pages middleware integration instead: https://documentation.openiddict.com/integrations/aspnet-core#status-code-pages-middleware-integration.

@kjac kjac merged commit eff520c into v15/dev Sep 4, 2024
15 of 16 checks passed
@kjac kjac deleted the v15/fix/auth-errors-follow-openid-standard branch September 4, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants