-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: handle OAuth errors #2227
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
faa7598
to
a675967
Compare
b2b6bf9
to
06aaca5
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.
These code changes look good to me!
I'm not sure if this is just me, but when I try to log out, the IdG doesn't redirect me back to Benefits. I end up at this screen:
When I try log out on https://dev-benefits.calitp.org, it redirects me back to Benefits.
Does this happen for anyone else?
06aaca5
to
872773e
Compare
The code looks good and I did see the new error screen when going through a flow that uses a misconfigured
|
@angela-tran I'm seeing this behavior now locally, but not in |
I found the issue, it was a change from this PR 😞 I'm going to revert it and rebase... stand by. Fixed now, I dropped out the commit that changed the URL of our |
f5c7820
to
06fdbb8
Compare
Ah that makes sense |
logs exception to Sentry
- operation references the specific call that failed - message gives more information about the exception or response code
operation: authorize_redirect
operation: authorize_access_token
operation: load_server_metadata
align all test function signatures to have this parameter first
06fdbb8
to
664afd3
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.
Looks good!
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.
The logic looks good @thekaveman for the misconfigured verifier case, but there may be a small typo related to checking for is None
and == ""
that prevents the new error page from displaying.
the case when the session verifier has neither Eligibility API nor IDP config is a system error / configuration error
664afd3
to
5bce79d
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.
Looks good! 👍
Closes #2019
oauth
appoauth error
in all casesoperation
property indicates the specific client call:init
,authorize_redirect
,authorize_access_token
, andload_server_metadata
message
property describes the exceptionHow to test
bin/init.sh
to get the PO file updatesF5
/oauth/error
: see the error pageAuthProvider
): see the error pageEligibilityVerifier
to not specify anAuthProvider
and without an Eligibility API base URL or form class and attempt to sign in with this verifier selected: see the error page