Is there a way to get the transports in fido server side? #153
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
The transport is supposed to be copied over here: https://github.com/webauthn-open-source/fido2-lib/blob/master/lib/parser.js#L232 Summarized: The server can only read it if the client sends it. You must make sure that this is done by the client. |
Beta Was this translation helpful? Give feedback.
-
Based on @JamesCullum and ChatGPT answers, I think I've found the problem and a possible documentation enhancement. interface AttestationResult {
id?: ArrayBuffer;
rawId?: ArrayBuffer;
transports?: string[];
response: { clientDataJSON: string; attestationObject: string };
} Look that there's a transports variable on it. But, this variable (transports) is not documented as the other 3 on attestationResult method as a member of res attribute: Maybe document the transports variable will make it more clear for those who wants to keep it on server side. Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your research and suggestion! Do you want to improve the documentation to add this clarification? Feel free to create a PR whenever possible 👍 |
Beta Was this translation helpful? Give feedback.
Based on @JamesCullum and ChatGPT answers, I think I've found the problem and a possible documentation enhancement.
On fido2-lib source-code, I've found the AttestationResult interface declaration as:
Look that there's a transports variable on it.
If passing it, the transports will be filled on registration result:
But, this variable (transports) is not documented as the other 3 on attestationResult method as a member of res attribute:
Maybe document the transports variable will make it more clear for those who wants to ke…