Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 1 month ago

Magic Link Pitfalls

etodd.io

external-link
message-square
0
link
fedilink
1
external-link

Magic Link Pitfalls

etodd.io

RSS BotMB to Lobste.rsEnglish · 1 month ago
message-square
0
link
fedilink
Recently I was surprised to discover that there are several bad ways to do magic links. The basic idea is: a user hits “login”, enters their email address, and receives an email that allows them to login without a password. What could possibly go wrong? I work in security, so I already knew a few best practices I would need to implement: The link should have a short expiration The link should only work once The link should include a secret code with a sufficient amount of entropy (I went with 64 bits; your paranoia may vary) The database should store a hash of the secret code, not the code itself Here’s two more that were not immediately obvious to me.

Comments

alert-triangle
You must log in or # to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 58 users / day
  • 194 users / week
  • 566 users / month
  • 1.64K users / 6 months
  • 2 local subscribers
  • 371 subscribers
  • 12.9K Posts
  • 841 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org