3. Authenticating Users in Nest.js with Neo4j | Building Web Applications with Neo4j and Typescript

  • Length: 1 hr 25 min

In this video, Adam demonstrates how to build an Authorisation Module in Nest.js. After building a registration route, users are issued with a JWT token which can be used to authenticate them when they make HTTP requests.

  • Created a User module which provides a service for interacting with Users in the database. The service will allow you to find a User by its email address and create a user following business rules.
  • Created an Auth service which will create users via the UserService, authenticate the User using their email address and password, and issue a JWT token to allow them to access protected API endpoints.
  • Created a Guard that will read the JWT token and either permit or deny access to the protected endpoints.
  • Created an Auth Controller with routes for registering and signing in.
  • Added end-to-end tests to ensure that User Registration and Authentication flow works as expected

This video is part of a series of live streams on the Neo4j Twitch Channel on on Building Web Applications with Neo4j and TypeScript.

Developer tools