Fastify User Authentication with JWT 👨‍💻 Develop an App from Scratch (Part 4)

Published: 24 February 2024
on channel: NL Tech
3,497
63

In this video I will start working on the controllers. I will use Fastify as the HTTP(s) server and router. I start by installing and setting up Fastify. After that I start working on the users controller which will support Create/Read/Update/Delete endpoints and a special login endpoint for JWT authentication. After I setup the CRUD RESTful API endpoints I use @fastify/jwt to setup authentication with json web token. I abstract away the JWT authentication utilities to a seperate plugin which allows me to create a token and make an endpoint inaccessible if a user is not logged in.

Repository:
bw-backend-service: https://github.com/nikelaz/bw-backend...

Contents:
0:00 Introduction
0:22 Changes to the Models Since Last Video
3:13 Setup Fastify
9:01 Create the Users Controller Plugin
15:36 Get a Single User (GET request)
18:12 Create a New User (POST request)
26:49 Modify User Details (PUT request)
30:01 Delete a User (DELETE request)
31:20 Move Types and Schemas to Separate Files
25:23 Create a Login Endpoint
39:04 Setup @fastify/jwt
47:25 Conclusion

Social Media:
Email: [email protected]
Twitter:   / nikelaz  
LinkedIn:   / nikola-lazarov  

#project #application #fastify #jwt #auth


Watch video Fastify User Authentication with JWT 👨‍💻 Develop an App from Scratch (Part 4) online without registration, duration hours minute second in high quality. This video was added by user NL Tech 24 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,497 once and liked it 63 people.