Password-based authentication and ‘Login with Wallet’ can create security vulnerabilities and user friction. Magic links are an easy and fast way to create a secure authentication process for your users. Instead of users needing to sign data with a blockchain wallet, passwordless authentication with magic links for Passport.js improves the safety of users. Your users will have already proven they own the wallet address in Mailchain and can therefore take advantage of Mailchain’s account abstraction.
Key features include:
In this tutorial, we will build a todo list app, complete with functionality that allows users to sign in with Mailchain. By following along with this tutorial, you will learn how to use Passport for passwordless authentication using Mailchain to send magic links.
As we work through the tutorial, we'll be using Express as our web framework, along with EJS as our template engine and CSS for styling. We will use SQLite as our database for storing data. Don't worry if you are not familiar with these technologies -- the necessary code will be provided at each step.
You can find an example of the final result here https://github.com/mailchain/todos-express-mailchain on Github.
Follow the full steps for the tutorial here: https://docs.mailchain.com/developer/tutorials/integrations/passport-magic-link-tutorial/