-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add API to show error messages from failed token fetches #498
base: main
Are you sure you want to change the base?
Conversation
Ready for another look @yi-gu |
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.
Thanks. LGTM!
Hey @bvandersloot-mozilla @martinthomson @cboozar requesting Mozilla to take a look. |
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.
Thanks, lgtm
@npm1 just checking: is there anything else we need to act on before we merge this? |
Yes, I need to rebase and change the |
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 don't think we need to make this web-observable and doing so risks leaking information to the RP about shared browser state.
What is 'this'? And can you elaborate on the leak you are thinking about? |
"this" is the |
That is correct, but the IdP needs to set this value itself in the response in order for it to be passed to the RP (it is not 'leaked'). Also perhaps worth noting that the error is passed from the ID assertion fetch, so the user must have tried to use FedCM in the RP. |
Ah, I didn't realize this is happening on the id assertion endpoint only. In that case, this is reasonable, but we should probably enumerate the possible values for |
I was hoping to leave the values for |
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.
Small tweaks for clarity
Putting this on hold to get some discussion with other WGs on error handling, hopefully to occur during TPAC. |
Rebased this PR in case people want to take another look ahead of TPAC discussion |
Adds the capability for the FedCM API to show error dialogs in certain scenarios after the user has chosen to perform federated login with an account. For this purpose:
IdentityCredentialError
is created, which may contain anerror
which is a string that contains the specific error, and the user agent may use to customize the UI). It may also containurl
, in case the IDP wants to show a url where the user could get more information.Fixes #488
Preview | Diff