Skip to content

spec compliance and the transports typing #768

@felix-brainfinance

Description

@felix-brainfinance

Describe the issue

The simpleWebAuthn/server library typing require AuthenticatorTransportFuture[] as the type for the transports array,
now the spec is not super clear but from my understanding, this should be typed as string[] instead, because the server should not reject, filter or modify the value in there in any ways.

The items SHOULD specify transports whenever possible. This helps the client optimize the user experience for any given situation. Also note that the Relying Party does not need to filter the list when requesting user verification — the client will automatically ignore non-eligible credentials if userVerification is set to required.

2.1.1. Enumerations as DOMString types
Enumeration types are not referenced by other parts of the Web IDL because that would preclude other values from being used without updating this specification and its implementations. It is important for backwards compatibility that client platforms and Relying Parties handle unknown values. Enumerations for this specification exist here for documentation and as a registry. Where the enumerations are represented elsewhere, they are typed as DOMStrings, for example in transports.

transports
The value returned from getTransports() when the public key credential source was registered.
Note: Modifying or removing items from the value returned from getTransports() could negatively impact user experience, or even prevent use of the corresponding credential.

do you think it would make sens to reduce the typing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions