TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Single-factor authentication via email – good idea or not?

5 点作者 upgradeind大约 4 年前
Background: I am attempting to create a very minimal website for my company written in Rust (yay!). All it does is list products and accept orders with no community or user submitted content beyond payment data (handled via stripe and I only save shipping info). I am using the Rocket framework which doesn&#x27;t seem to have this baked in yet.<p>The problem: I need a way to let previous customers recover order information and print invoices, but I personally hate being forced to create user accounts on websites just for this purpose. I also didn&#x27;t want to deal with user passwords and account recovery (hey I said it was minimal!).<p>The scheme I&#x27;ve come up with and tested successfully so far in my dev environment, is to let customers type their email address that they used to make orders orders and send them a time-limited one-time login key via email (it could also come via text using their number if I ever figure that one out).<p>This in theory verifies they control that email address, and once logged in they can see previous order information.<p>That&#x27;s pretty much it, but seeing as how I&#x27;ve never seen this type of thing available before in my Django or Flask experience, I wanted to see if I was in fact making some kind of huge mistake from a security or convenience perspective. The last thing I&#x27;d want to do is compromise the security of clients&#x27; information, or make a system that is too annoying to use.<p>I am also trying to be reasonable because it&#x27;s not like I&#x27;m storing vast amounts of personal information or payment credentials.<p>I would also like to think about open sourcing my solution or submitting it as an add-on to Rocket, but I need a gut check first.<p>thanks!

4 条评论

moviuro大约 4 年前
Sounds reasonable. However, the access to previous orders should be limited in time.<p>email addresses, like snail mail addresses do expire: what happens if the email address owner changes after the fact? Should you serve the recap and other snail mail addresses a long time after the deal is done and finished? Unless you have mandatory requirements (commercial law) to keep serving invoices&#x2F;recaps, I&#x27;d recommend you seal those away when they aren&#x27;t needed anymore (and protect them with a password).<p>Something &quot;new&quot; to consider, is how Chrome[0], FFx and company now &quot;suggest&quot; strong passwords when registering on a website. Using the email-OTP might be more cumbersome than using your phone&#x27;s or PC&#x27;s built-in password manager.<p>Less data to protect = easier to deal with.<p>[0] <a href="https:&#x2F;&#x2F;support.google.com&#x2F;chrome&#x2F;answer&#x2F;7570435?co=GENIE.Platform%3DAndroid&amp;hl=en" rel="nofollow">https:&#x2F;&#x2F;support.google.com&#x2F;chrome&#x2F;answer&#x2F;7570435?co=GENIE.Pl...</a>
评论 #26515782 未加载
borplk大约 4 年前
I&#x27;m personally against the idea because it wrongly assumes that email is some form of guaranteed instant messaging platform. You can end up denying someone access because the email is delayed or never arrives.
adingus大约 4 年前
Freecodecamp does this. As a user I like the feature for the same reasons you stated.
eimrine大约 4 年前
My opinion is that any 2fa is bad. If Bitcon can work without usernames, phone or email verification then your service also can.