3. Authenticating Users in Nest.js with Neo4j | Building Web Applications with Neo4j and Typescript
Play video on YouTube: 3. Authenticating Users in Nest.js with Neo4j | Building Web Applications with Neo4j and Typescript
Up next
4. Authorising HTTP requests with Neo4j | Building Web Applications with Neo4j and Typescript
Up next
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.
Resources mentioned
- The code is available on Github at (opens in a new tab)
- Articles that accompany the series are available on the Neo4j Developer Blog at (opens in a new tab)
- Join us Tuesdays at 13:00 BST / 14:00 CEST / 15:30 IST on Youtube or the Neo4j Twitch Channel (opens in a new tab)
- Follow Adam on Twitter (opens in a new tab)
Developer tools





