-
Notifications
You must be signed in to change notification settings - Fork 3k
Fail early if the access token is not returned from GitHub #47750
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
Conversation
LOG.errorf( | ||
"Neither ID token nor access tokens are available in the authorization code grant response"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything the dev can do to fix that? (Check some URL, setting, etc?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gastaldi It depends on the situation, for example, in this case we saw GitHub returning GitHub specific error in JSON format with 200
response type...
Perhaps I should add Please check the logs for more details
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be nice. Also if the data isn't visible in the logs, maybe point to a URL where you can find more info on how to fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is in the actual GitHub response, it includes link to the trouble shooting guide, the problem they return it with 200 which needs a debug level to be seen... Let me tune it a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave it a try :-)
This comment has been minimized.
This comment has been minimized.
99446fe
to
32da46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Status for workflow
|
If GitHub provider fails to complete the authorization code flow, it will reply with 200, without the actual access token, causing a confusing error when Quarkus OIDC attempts to verify this non-existent token via the UserInfo injection...
This PR adds a couple of checks to fail early and an extra check to check the confusing error