Unify registration and authentication #180
Replies: 1 comment 3 replies
-
I think it can be a valid flow, in fact I did something like that with my https://dontneeda.pw/access demo site from back before I made SimpleWebAuthn (in fact a lot of code in the library originated from this project). There's a single form you enter an email address into, and based on whether you've registered before the magic link that gets sent to your email address either triggers registration or authentication when you click on it. I can't say I've seen too many other sites do that, but I do think it's at least feasible. Your job as an RP would be to pull that off in a way that doesn't confuse both new users and returning users who are used having separate "Sign Up" and "Log In" forms to fill out.
The UI logic that would power a flow like would definitely not be handled by this library. Supporting two flows from a simple one-button form can be easily accomplished with the four primary methods of @simplewebauthn/server, however you'd need to write the logic to know when to call them because, at the end of the day, WebAuthn still requires taking four steps on the server:
There are myriad NodeJS server frameworks in which these methods can be called, and nevermind all the different ways to architect relying parties, so I don't think it'd be appropriate trying to incorporate new functionality SimpleWebAuthn targeting any one combination of things. Might you have an idea for how I might add support for a single-button form? |
Beta Was this translation helpful? Give feedback.
-
Hey.
First of all, thanks for the great library, it works as charm :)
I thought of creating 1 button for both registration and authentication to reduce user friction.
I wonder if its even valid (security-wise)?
If so, adding a support for that kind of flow can be great.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions