Skip to content
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

[2.0] WFetch should also be debuggable #23

Open
2 of 3 tasks
saibotk opened this issue Dec 5, 2024 · 2 comments
Open
2 of 3 tasks

[2.0] WFetch should also be debuggable #23

saibotk opened this issue Dec 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@saibotk
Copy link

saibotk commented Dec 5, 2024

Bundler & Interpreter

No response

Browser & OS

No response

Have you done this?

  • I have checked my logs and I am sure is a bug in this package.
  • I can reproduce this bug in isolation (vanilla install)
  • I can suggest a workaround as a Pull Request

Expectation

The function should return the credential data and ID as advertised by its types.

Description

Currently the assertRaw function correctly retrieves the credentials, but then calls wfetch and returns its result, which seems to only provide the success and error values.

The id would be nice to have here, to enable follow up code interaction for example to show a dialog to assign the credential a nickname.

Reproduction

const { success, error, id, credentials, data } = await Webpass.attest(
  '/webauthn/register/options',
  '/webauthn/register',
)

console.log(credentials, id, data) // <--- All are undefined

Stack trace & logs

No response

@saibotk saibotk added the bug Something isn't working label Dec 5, 2024
@DarkGhostHunter DarkGhostHunter added enhancement New feature or request and removed bug Something isn't working labels Dec 5, 2024
@DarkGhostHunter DarkGhostHunter changed the title [2.0] Webpass.attest does not return credential information [2.0] WFetch should also be debuggable Dec 5, 2024
@DarkGhostHunter
Copy link
Collaborator

I think it's better to make the wftech function debuggable, so this way you can know what is being sent and received. If there is a connection error, it should appear in the browser console.

@saibotk
Copy link
Author

saibotk commented Dec 5, 2024

Yes, but we should also still pass the credential id as a result, to cover the use case of interacting with the new credential after creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants