TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Lightweight Authentication

31 pointsby scoresmokeover 2 years ago
I want to let users log in to my proof-of-concept Web app. However, I don&#x27;t want to maintain a fully-fledged authentication solution, managing logins, passwords, OAuth tokens, and their recovery.<p>Ideally, I&#x27;d like to receive a unique user token and allow one to log in back if they decide to return. I don&#x27;t need any user metadata.<p>OpenID requires quite an effort and a provider like Google or Okta. The most-matching concept was Mozilla Persona, but it was shut down in 2016.<p>What is the better way to implement this? Should I stick to the plain old login-password combination?

13 comments

mooredsover 2 years ago
Full disclosure, I work for a fully-fledged authentication solution (FusionAuth) and if your PoC succeeds, my guess is you&#x27;ll look to make a move to a similar solution. But I understand your desire to go quick and dirty.<p>You didn&#x27;t provide a ton of details (the programming language affects library options, for example) but I would go one of the following ways:<p>* login with a social provider like google, facebook or github. I don&#x27;t know what your audience is, but hopefully you know which of these (or any other) would have the most uptake. This delegates the entire authentication process to a third party and allows the user to choose the level of security they want around their account without involving you at all.<p>* look for an OSS library in your language that offers magic token login. This is what you are describing when you talk about the token. Implement that. If you can find such a library, this will be a simpler solution.<p>&gt; What is the better way to implement this? Should I stick to the plain old login-password combination?<p>I&#x27;m not your user and we don&#x27;t have any idea what your userbase is. I&#x27;d ask them. Lots of tech folks want a username and password so they can use a password manager. Non-tech folks would probably prefer one of the two above options.
jonahbentonover 2 years ago
An excellent women&#x27;s soccer publication, Equalizer Soccer [1], which seems to use Memberful, has the authentication system I want EVERY non-critical publisher&#x2F;app to use-<p>1. enter email address<p>2. email me a signin link<p>3. i click the link<p>4. i am in, on whatever device i am using<p>There is no password and no needed coordination with my password management.<p>It is glorious.<p>1. <a href="https:&#x2F;&#x2F;equalizersoccer.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;equalizersoccer.com&#x2F;</a>
评论 #34184902 未加载
评论 #34180794 未加载
评论 #34179205 未加载
评论 #34179131 未加载
throwaway888abcover 2 years ago
For PoC Firebase Authentication<p><a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;auth" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;auth</a><p>You get hosted + UI + OAuth<p>There are many others:<p><a href="https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;auth&#x2F;overview">https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;auth&#x2F;overview</a><p><a href="https:&#x2F;&#x2F;www.keycloak.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.keycloak.org&#x2F;</a><p><a href="https:&#x2F;&#x2F;www.permify.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.permify.co&#x2F;</a><p>...<p>..
评论 #34181665 未加载
Leftiumover 2 years ago
Magic email links essentially transfer &quot;managing logins, passwords, OAuth tokens, and their recovery&quot; to the user&#x27;s email provider.<p>Many auth providers support magic links. I recommend <a href="https:&#x2F;&#x2F;userfront.com&#x2F;dashboard&#x2F;authentication" rel="nofollow">https:&#x2F;&#x2F;userfront.com&#x2F;dashboard&#x2F;authentication</a>
0xPITover 2 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;ory">https:&#x2F;&#x2F;github.com&#x2F;ory</a><p>You should also be able to get a free tier at Auth0
toomuchtodoover 2 years ago
<a href="https:&#x2F;&#x2F;passkeys.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;passkeys.dev&#x2F;</a>
FlxMgdnzover 2 years ago
Hey, we&#x27;ve built exactly what you are describing: <a href="https:&#x2F;&#x2F;www.hanko.io" rel="nofollow">https:&#x2F;&#x2F;www.hanko.io</a><p>You can go with either self-hosted or cloud. Cloud is free for up to 100 users.<p>If you have any questions along the way: <a href="https:&#x2F;&#x2F;www.hanko.io&#x2F;community" rel="nofollow">https:&#x2F;&#x2F;www.hanko.io&#x2F;community</a>
blondinover 2 years ago
send an expiring unique nonce token to their email address. when testing period is over you could implement another solution.
mkjover 2 years ago
For a personal webapp accessed from a few devices I just keep a list of session IDs in the app&#x27;s config file. The web framework generates the session id, it&#x27;s derived from a cookie with no expiry.<p>There&#x27;s a &quot;&#x2F;register&quot; page that just has a mailto: link to email myself, with the session ID in the mailto email body parameter. Easy to copy-paste into the config file when setting up a new device.<p>This is probably less useful for external users (who want to log in extra devices themselves), but something similar might work.
mamcxover 2 years ago
Something I wish exist is a solution that truly use my own tables and support multi-tenant. So you only configure the connection string and some SQL templates and that is all.
评论 #34186960 未加载
do_anh_tuover 2 years ago
Just use phone number and send a OTP code. User will understand it right away, and they usually have a phone in their hand most of the time.
threatofrainover 2 years ago
On a similar subject, does anyone have recommendations for how to roll your own conventional auth stack without using 3rd-party providers?
评论 #34184825 未加载
v3ss0nover 2 years ago
Just use Django, it has all builtin
评论 #34182835 未加载