Skip to content

Guidance for decoding/encoding protocol structs #389

@S0lomon

Description

@S0lomon

Description

It would be nice if the documentation can provide some guidance for how to decode structs like CredentialCreation on the browser. It's clear by the library design and the example code that you're meant to send these as JSON encoded to the browser. Yet, that won't do you any good unless you have logic in the browser to decode and encode these data structures (in particular, correct encoding/decoding of the base64 buffers, and knowledge of which fields this applies to).

I saw an example where someone used this library that seems to do the decoding for them https://simplewebauthn.dev/ but it's unclear if go-webauthn and simplewebauthn are actually compatible and conform to a common standard, or if they just happen to work in this specific instance. (Another example mentioning simplewebauthn here)

Over all I'd say my experience with this library has been frustrating because of the lack of guidance around the encoding/decoding. It seems like a bridge that everyone has to cross to use the library, and I don't see any reason why there wouldn't be an out of the box solution to help beginners get started faster. Something like a 1 file of Javascript with helper functions for all the common data structures would be ideal.

Use Case

No response

Documentation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions