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

Fix the error message for force_pkce #1755

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

lurz
Copy link
Contributor

@lurz lurz commented Dec 19, 2024

Summary

Bug

When the force_pkce option is enabled for a public client, and the authorization code request doesn't include a code_challenge, the error message returned is

"The authorization server encountered an unexpected condition which prevented it from fulfilling the request."

Root cause

[#1705] didn't add the error message in the locales.

Fix

Base on RFC https://datatracker.ietf.org/doc/html/rfc7636#section-4.4.1, we should return an "invalid_request" error with a proper description. I added a new entry for the error message and included a test to verify the proper message is returned.

lurz added 2 commits December 18, 2024 21:30
Bug
When the `force_pkce` option is enabled for a public client, and the
authorization code request doesn't include a code_challenge, the
error message returned is

"The authorization server encountered an unexpected condition which prevented it from fulfilling the request."

Root cause
PR doorkeeper-gem#1705 didn't add
the error message in the locales.

Fix
Base on RFC https://datatracker.ietf.org/doc/html/rfc7636#section-4.4.1,
we should return an "invalid_request" error with a proper description.
I added a new entry for the error message and included a test to verify
the proper message is returned.
@nbulaj
Copy link
Member

nbulaj commented Dec 20, 2024

@mattmanning can you please take a look? 🙏

Copy link
Contributor

@mattmanning mattmanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks!

Copy link
Member

@nbulaj nbulaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from my side as well, thanks!

@nbulaj nbulaj merged commit 6f249c8 into doorkeeper-gem:main Dec 23, 2024
18 checks passed
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