Fireship · @fireship

Auth0 in 100 Seconds // And beyond with a Next.js Authentication Tutorial

Uploaded October 18, 2021 · Length 8:24

Auth0 in 100 Seconds // And beyond with a Next.js Authentication Tutorial

Summary

Learn how to integrate Auth0 authentication into a Next.js app using a tutorial and sample code.

  • auth0
  • next.js
  • authentication
  • authorization
  • login
  • logout
  • user management

Transcript preview

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

  1. 0:00

    Auth0, a user authentication and authorization platform that serves as the front door to your application.

  2. 0:06

    Before someone can start using your app securely, they need to prove their identity.

  3. 0:10

    Historically, the most common method is email password authentication.

  4. 0:14

    As a developer, this requires you to create an interface on the front end to collect the password,

  5. 0:18

    then pass it off to a server and database to store it on the back end for future use.

  6. 0:23

    Your front end interface needs to look good, while your back end code needs to be secure and reliable.

  7. 0:28

    Auth0 is a universal solution that handles all of these concerns for you.

  8. 0:32

    It provides a polished login experience that you can drop into any web or mobile app,

  9. 0:37

    while also providing the infrastructure to store that data securely.

  10. 0:40

    Think of it like a universal translator that sits in between your front-end,

  11. 0:44

    back-end, and other third-party tools to manage the identity of your users.

  12. 0:48

    But modern applications tend to require user authentication methods

  13. 0:51

    that are far more complex than email password login.

  14. 0:54

    Users may want to log in with a social provider like Apple or Google,

  15. 0:58

    using the OpenID Connect standard, or you may require multi-factor authentication to send a

  16. 1:03

    text message to the user before unlocking the door, or you may want to take things even further

  17. 1:07

    to validate biometrics like a fingerprint scan. Auth0 supports all of these authentication methods

  18. 1:12

    out of the box and allows you to customize the flow with a click of a button. After sign-up,

  19. 1:17

    each user is assigned a unique ID and the record can be managed from the dashboard.

  20. 1:21

    You might view their login history or devices, or maybe you want to block a malicious user.

  21. 1:26

    You can also define custom authorization logic in the form of roles and permissions.

  22. 1:30

    You can then read this data from a front-end or back-end environment,

  23. 1:34

    with an SDK for virtually every runtime, and a REST API for everything else.

  24. 1:38

    This has been Auth0 in 100 seconds, but stay tuned because I've invited a friend of mine,

  25. 1:43

    James Q. Quick, to take us beyond 100 seconds to integrate Auth0 in a Next.js app.

  26. 1:48

    He's a developer advocate at Auth0, and also has an awesome YouTube channel that you should definitely subscribe to.

  27. 1:53

    Hi, everyone. My name is James, and I'm here to take you beyond 100 seconds in your journey to learning more about Auth0.