-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Exposed=Window, SecureContext] | ||
interface IdentityCredentialError : DOMException { | ||
constructor(optional DOMString message = "", optional IdentityCredentialErrorInit options = {}); | ||
readonly attribute DOMString code; |
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.
This overwrites a deprecated value that should be 0
. Another name would be 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.
Ah, good catch! We missed that... here are some other naming options, any preference?
- errorCode
- serverError{Code} (eg with or without Code)
- idpError{Code}
- credentialError{Code}
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.
- error
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.
Ping, I'd like to merge this sooner rather than later especially if we want to make a naming change here.
@npm1 just checking: is there anything else we need to act on before we merge this? |
Yes, I need to rebase and change the |
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