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

In the event of an OAuth Error we shouldn't return a 400 always #171

Closed
rybit opened this issue May 10, 2018 · 4 comments
Closed

In the event of an OAuth Error we shouldn't return a 400 always #171

rybit opened this issue May 10, 2018 · 4 comments
Labels

Comments

@rybit
Copy link
Member

rybit commented May 10, 2018

When we fail to login (e.g. no such user) we return a 400. The code will return an OAuth error appropriately, and then we map that to a 400. It should be a 403 in this case. I'm not sure that all of them are that way, but at least this instance.

if jsonErr := sendJSON(w, http.StatusBadRequest, e); jsonErr != nil {

@brycekahle
Copy link
Contributor

We try to follow the OAuth spec. What does it say for this situation?

@guido4000
Copy link

@brycekahle

We try to follow the OAuth spec. What does it say for this situation?

The OAuth spec does not seem to cover HTTP responses.
The HTTP spec defines
400 is Bad Request and
403 is Forbidden
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

So 403 should fit better.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 7 days if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale label Apr 24, 2021
@github-actions
Copy link

github-actions bot commented May 1, 2021

This issue was closed because it had no activity for over 1 year.

@github-actions github-actions bot closed this as completed May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants