Fireship · @fireship

Passwordless Authentication with Firebase

Uploaded March 23, 2018 · Length 7:23

Passwordless Authentication with Firebase

Summary

build passwordless authentication with firebase, using email link authentication for a frictionless signup process

  • firebase authentication
  • passwordless login
  • email link authentication
  • angularfire
  • firebase sdk
  • angular development

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    [Music]

  2. 0:02

    over the past few years you may have

  3. 0:04

    noticed certain apps transitioning from

  4. 0:06

    email pastor authentication to just

  5. 0:08

    email link authentication and there's

  6. 0:11

    two main benefits to doing this first

  7. 0:12

    your users don't have to remember a

  8. 0:14

    password and two it provides a

  9. 0:16

    frictionless signup process that makes

  10. 0:18

    it more likely for you to onboard new

  11. 0:20

    users one app that does this is open

  12. 0:22

    collective and the possibility just

  13. 0:24

    became available to finder base

  14. 0:25

    developers a couple days ago and I

  15. 0:28

    wanted to send to thank you out to all

  16. 0:29

    angularfire BassPro members because your

  17. 0:31

    subscription allows me to donate to

  18. 0:33

    other open-source projects through open

  19. 0:35

    collective and I'm very grateful to be

  20. 0:36

    able to do that in today's video we're

  21. 0:39

    going to use firebase to build our own

  22. 0:40

    password lists off system which will

  23. 0:42

    take-it users email send them out an

  24. 0:44

    email link that will authenticate them

  25. 0:46

    into our firebase app I'm starting with

  26. 0:50

    a brand new angular app and making sure

  27. 0:51

    that it has a router then generating a

  28. 0:54

    new component called password list off

  29. 0:56

    from there you'll need a firebase

  30. 0:58

    project with angular fire - installed

  31. 1:00

    and if you're starting from an existing

  32. 1:02

    project make sure to update the firebase

  33. 1:04

    SDK to the latest version then go into

  34. 1:07

    the firebase console for your project

  35. 1:09

    and enable the email link method under

  36. 1:11

    the email password settings now quickly

  37. 1:15

    taking a look at the app module you

  38. 1:17

    should have the angular fire module as

  39. 1:19

    well as angular fire often here with you

  40. 1:21

    our firebase web credentials then

  41. 1:23

    initialize the app down here in the

  42. 1:25

    import section from there we'll jump

  43. 1:28

    over to the router and we'll route our

  44. 1:30

    component to the login path what's going

  45. 1:33

    to happen is the user will initially

  46. 1:34

    land on this component they'll get their

  47. 1:36

    email link and then they'll come back to

  48. 1:38

    this component with a special off code

  49. 1:40

    that we can use to log them in depending

  50. 1:42

    on your requirements you may want to

  51. 1:44

    break this down into two separate

  52. 1:45

    components one to get the actual link

  53. 1:47

    and then another one that they're

  54. 1:48

    redirected to to actually sign in for

  55. 1:51

    the sake of simplicity here we'll just

  56. 1:53

    do everything in a single component the

  57. 1:56

    end result should look like this the

  58. 1:57

    user enters their email address we

  59. 1:59

    notify them that we sent the email they