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

Change: More descriptive exceptions on /user/token endpoint #83

Closed
wants to merge 1 commit into from
Closed

Conversation

spnda
Copy link

@spnda spnda commented Mar 22, 2021

I'm developing a CLI and have been quite overwhelmed with the 404s and 500 exceptions. With this, I think the errors should be easier to handle for any developer trying to authenticate. If the user cannot be found by code, it still throws a 404 exception.

One could technically just put a 403 for the code_verifier exception, as that would fit more than a 404.

@TrueBrain
Copy link
Member

TrueBrain commented Mar 22, 2021

Sadly, this is default security measures for OAuth endpoint. This has to do that otherwise people can (relatively easy) sniff out secrets; which should be avoided.
You can compare this with that no site should ever tell "invalid password" but always "invalid username + password combination". Giving out the username exists is already too much information.

I understand that this might be annoying when implementing a client, but this is exactly why a reference implementation is supplied. Best way to implement this locally, is run a local setup and code against that. That does allow you to get a more fine-grained information about any issues and hurdles you hit.

So, in conclusion, sadly, I will not accept this PR.

@TrueBrain TrueBrain closed this Mar 22, 2021
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.

None yet

2 participants