3 ms·
A relatively simple solution is temporary sign in tokens via email. Encrypt and timestamp in the database and pick a TTL (the shorter the more secure, the longe
by rapind 7y ago
A relatively simple solution is temporary sign in tokens via email. Encrypt and timestamp in the database and pick a TTL (the shorter the more secure, the longer the more convenient). Then just email a login link with the email and token as params. Perform auth lookup on email, then secure compare the tokens (in constant time to avoid timing attacks).
You now have an auth system that avoids horrible passwords (no passwords).
The downsides are: 1) Cost to send emails for login, 2) People complaining about it being weird.
Worth it in many cases.