Ask HN: Simple Auth for Website

1 points by hot_gril 12 days ago

I'm making a fairly simple website and browser extension where users will have accounts*. All I need to do is auto-create an account the first time someone uses it, then have that account auto reused every time the user visits later on the same device. A second factor like a password isn't needed. Ideally users should be able to transfer their accounts to other devices, but I'm even willing to forego that in version 1. It's supposed to be an open-source project, and to encourage adoption, I don't want it to depend on any external auth services, just a database.

Does anyone have a favorite drop-in way of doing something like this? Webauthn looks appealing, but I've never used it. Can also imagine just randomly generating some code server-side, storing it in cookies, and asking users to save it for recovery, but that feels like poorly reinventing a wheel.

Thanks

* For anyone curious, it's supposed to be a federated lightweight social network based partially on RSS.