question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Idea: Add new helper methods for MFA, PWL, and Usernameless registration and authentication

See original GitHub issue

SimpleWebAuthn already makes interacting with the WebAuthn library fairly painless, but can I take things one step further? The thought occurred to me that I might be able to offer a higher-level abstraction to the registration and authentication options generation and response verification methods. These abstractions would set combinations of options appropriate for use of WebAuthn for MFA, Passwordless, and Usernameless “modes”, with minimal arguments to specify things like allowCredentials:

Registration

  • getMFARegistrationOptions()

  • getPWLRegistrationOptions()

  • getUNLRegistrationOptions() (UNL -> “Usernameless”, you heard it here first! 😅)

  • verifyMFARegistrationResponse()

  • verifyPWLRegistrationResponse()

  • verifyUNLRegistrationResponse()

Authentication

  • getMFAAuthenticationOptions()

  • getPWLAuthenticationOptions()

  • getUNLAuthenticationOptions()

  • verifyMFAAuthenticationResponse()

  • verifyPWLAuthenticationResponse()

  • verifyUNLAuthenticationResponse()

Or maybe a new, optional mode argument on the existing methods that you specify as "mfa" | "pwl" | "unl"? That might actually be cleaner 🤔

In any case the idea is, there are certain options you must set if you want to, for example, leverage WebAuthn for Passwordless login. Without digging into the docs, though, you might not think to set them. I think there’s a chance here to help devs even further by offering a quick and easy way to generate appropriate options and verify responses that will help ensure secure authentication for all use cases.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
MaKleSoftcommented, Sep 20, 2021

Oh, and I vote for the mode argument instead of a ton of different functions. Just my preference though.

4reactions
MaKleSoftcommented, Sep 20, 2021

That sounds like a great idea! I think one of the main hurdles for many devs trying to adopt WebAuthn is understanding all the different use cases and how to implement them. Heck, I still haven’t fully grasped how “passwordless” or “usernameless” are supposed to work in practice. I think descriptive APIs like the ones you’re suggesting are a great way to guide developers towards the solution they’re looking for and help avoiding many pitfalls and frustrations when adopting a new technology.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Setup Assistant with modern authentication
This post provides an introduction to this new authentication method, followed with the steps to configure an enrollment profile with this new ......
Read more >
Simple Index
aws-auth-helper · aws-autodiscovery-templater ... aws-custom-json-manager · aws-ec2-assign-elastic-ip · aws-ec2-scheduler ... backports.method-request
Read more >
SimpleWebAuthn issues - Git Memory
Idea : Add new helper methods for MFA, PWL, and Usernameless registration and authentication. 13 comment. SimpleWebAuthn already makes interacting with the ...
Read more >
SimpleWebAuthn - bytemeta
Idea : Add new helper methods for MFA, PWL, and Usernameless registration and authentication. MasterKale. MasterKale CLOSED · Updated 1 year ago ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found