You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm creating a project at work using Serverpod, and I don't want users to have to remember yet another password. I plan to have them enter their email, then the server will email them a random 6-digit passcode which they can put into the server. Rather like the current implementation, but without the password, and with the added benefit of logging them out if they've not made a request in a certain amount of time.
Firstly, I ain't a security expert. I just know how fragile passwords are. Is this a terrible idea? My bank do it, so I'm thinking not, but I'd rather get a second opinion from you lovely people.
Secondly, if I make this, is it a feature that the team would consider adding back into Serverpod?
Thanks for a wonderful package. I look forward to any replies.
This sounds very much like Slacks magic link and is basically just a multi factor authentication where possession of the email is the means of authenticating the user.
I'm not a security expert either, so the advice given below only reflects my personal thoughts and are not best practices.
There are a couple of things I would take into consideration:
Email service security - The schema would rely on the security of the email service, this should be the same as if a user request a password reset but is good to keep in mind (which is basically what your 6-digit passcode would represent).
Brute force concerns - Make sure there are mechanisms to protect from brute force attacks. This could be limiting the number of tries agains a validation code before it is removed together with a short time window for when the code works.
This sounds like a neat feature to provide and would be cool to include. But for it to be included in the auth modules in Serverpod it would need to be a good implementation that is well tested and documented.
Activity
SandPod commentedon Apr 10, 2024
Hey @ChrisCRCB!
This sounds very much like Slacks magic link and is basically just a multi factor authentication where possession of the email is the means of authenticating the user.
I'm not a security expert either, so the advice given below only reflects my personal thoughts and are not best practices.
There are a couple of things I would take into consideration:
This sounds like a neat feature to provide and would be cool to include. But for it to be included in the auth modules in Serverpod it would need to be a good implementation that is well tested and documented.
migalv commentedon May 3, 2025
I think this is quite important for modern applications.
The sign-up and sign-in flows in applications have the highest churn percentage.
It's key to have a easy & seamless authentication process and magic links are great to achieve this.
feat: Add models and migrations for passwordless email login
feat: Add passwordless email identity provider
feat: Add passwordless email sign-in widget to the auth idp Flutter p…
docs: Add passwordless email sign-in to the auth example and setup guide
fix: Harden passwordless email login against enumeration, races and p…
test: Cover decoy requests, cooldown, post-commit send, pool limits a…
test: Cover the resend cooldown error through the passwordless test e…
chore: Regenerate the auth example and test clients for the updated e…
fix: Keep the login request across the resend cooldown in the passwor…
fix: Make the passwordless start form scroll and default to digits 0-9
test: Cover the passwordless Flutter cooldown, lifecycle, overflow an…
feat: Add passwordless login to the email identity provider
ChrisCRCB commentedon Oct 22, 2026