dexidp / dex

OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
https://dexidp.io
Apache License 2.0
9.22k stars 1.67k forks source link

incorrect response for github connector is user not in required org #1438

Open jtnord opened 5 years ago

jtnord commented 5 years ago

if the user is not in the required github or then dex returns 500 along with "Failed to authenticate: github: user "wibble" is not in required orgs or teams".

However - this should not be a 500 error code but a 403 - the user is authenticated - they just have no authorisation to proceed.

or to put it another way the Internal server error makes it look to the user as though this is something that can be fixed by retrying.

jtnord commented 5 years ago

see https://github.com/dexidp/dex/blob/c113df2730052e20881dd68561289f8ae121300b/connector/github/github.go#L389

srenatus commented 5 years ago

Yeah, it would be good to be able to differentiate these! 😃

imrenagi commented 4 years ago

can i take this one?

almereyda commented 1 year ago

This seems like a nice semantic change for clarity.