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

23 Jul, 2020



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. The code is available on Github at: https://github.com/adam-cowley/twitch-project Articles that accompany the series are available on the Neo4j Developer Blog at: https://medium.com/neo4j Join us Tuesdays at 13:00 BST / 14:00 CEST / 15:30 IST on Youtube or the Neo4j Twitch Channel: https://twitch.tv/neo4j_ Follow Adam on Twitter: https://twitter.com/adamcowley

Related Videos