-
Notifications
You must be signed in to change notification settings - Fork 39
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
Should mediation be defaulted at all? #256
Comments
Ok, so, now that I gave this more thought and drank some coffee.... yeah, dropping the default value entirely and letting the Credential Type determine the default value would be best... if it doesn't provide a default type, it defaults to "conditional". |
Something that occurs to me as I read this is that if we allowed different credential types to pick different defaults, than we would corner ourselves from asking more than one at a time (eg. Which default do you use?). |
My thinking is that the stronger default applies... the strongest being "required", so if any require " In the PR I asked if there was ever a case for any other enum value other than "required" and "conditional". If not, then specs just declare mediation is required and that wins, because UI must be shown no matter what possibly for both. In cases where mediation is not required simultaneously, then N requests could just be made one after the other. |
Isn't |
Yes, sorry, I got confused and thought “conditional” was the default - my apologies. However, the definition of “optional” is still problematic, though the spec does provide guidance:
The issue stands though in that for the DC API, developers would still need to explicitly say it’s “required”. My recommendation of letting the each credential type dictate its own default stands. |
I don't understand how the default mediation is a problem for DC 🤔
|
While working on WICG/digital-credentials#149 it occurred to me that perhaps we should let mediation be
nullable and make null the default- changed my mind... let's remove the default value entirely.The rationale is that a credential interface determines what its mediation requirements (and could determine its own default value), as per steps 8.1:
So, for example, for Digital Credential, a missing value (null) could be treated as "required". And the DC API could also define the allowed values in a backwards compatible / extensible way.
The problem right now for DC API is that mediation is always required, so that means every call to .get() must include
{"mediation": "required"}
, which is annoying from a developer point of view. It should just default to "required" when the credential type isDigitalCredential
instead.The text was updated successfully, but these errors were encountered: