MENU

Fun & Interesting

You don't need passwords anymore! NestJS passwordless magic link authentication

Marius Espejo 13,272 2 years ago
Video Not Working? Fix It Now

In this tutorial video we take a look at the steps to implement passwordless authentication via magic links using NestJS and PassportJS. 00:00 - Passwords are terrible 01:15 - Project setup 02:25 - Users Service 03:40 - API design 06:43 - passport-magic-login intro 08:14 - Magic Login Strategy 14:53 - Auth Service validate user 17:10 - Complete login route and send magic links 21:17 - Validate email pattern 23:02 - Complete callback route 27:35 - Generating JWT upon login 30:59 - Protect routes with JWT check 34:23 - Full authentication flow demo 35:31 - A couple extra thoughts 35:35 - Outro

Comment