You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've spent a very painful hour debugging Grafana OAuth, for the issue to end up being that the user has no email.
This irritates me a lot, because Grafana was entitled to view the user's email (as in, the scope was correct) and the moment my user had an email, it started working, however the system was returning no understandable error.
To Reproduce
Create an application that requires email scope (Grafana was how I hit this, so if repro fails, a Grafana deploy should do)
Request userinfo/emails with the requested user having no email
Server returns us 404 with HTML? We're not a browser?
Expected behavior
404 with HTML over what I expected to be a machine endpoint initially made me think that the request was against an endpoint meant for the website.
At the very least don't return HTML, ideally return a different error code entirely to indicate that the request cannot be served.
Screenshots
If applicable, add screenshots to help explain your problem.
Grafana appears to append this to the userinfo endpoint when using Generic OAuth authentication, I'm not sure if this is some specific vendor specific fallback behavior.
This sounds specific to grafana indeed. Could you provide information on how the provider was configured in authentik and how grafana was configured as well.
For Authentik, I used the Wizard to create an OAuth app, set an implicit auth flow and added the expected redirect URI
For Grafana I used the Web UI for configuring Generic OAuth, entered the Client Id and Secret, replaced the scopes with emailprofileopenid like the guide says. Then it offers to fill out the fields with a OpenID Connect Discovery URL, I entered the OpenID Configuration URL into that and it filled out the URLs
I believe that setup should have been correct if it wasn't for the weird email behavior
Describe the bug
I've spent a very painful hour debugging Grafana OAuth, for the issue to end up being that the user has no email.
This irritates me a lot, because Grafana was entitled to view the user's email (as in, the scope was correct) and the moment my user had an email, it started working, however the system was returning no understandable error.
To Reproduce
userinfo/emails
with the requested user having no emailExpected behavior
404 with HTML over what I expected to be a machine endpoint initially made me think that the request was against an endpoint meant for the website.
At the very least don't return HTML, ideally return a different error code entirely to indicate that the request cannot be served.
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Version and Deployment (please complete the following information):
The text was updated successfully, but these errors were encountered: