The professor of my NextJS course just posted this:
Mirko posted an announcement
Authentication with the Next.js App Router
Hi all,
Today I have published two new sections on Authentication with the App Router to the Next.js by Example course:
Section 19: Authentication: Cookies and JWTs
Section 20: Authentication: User Database
Authentication is a functionality many of you have asked about, and the new sections will hopefully give you a good starting point.
As I mention in the Overview video, it's actually a pretty complex topic, and it isn't really feasible to cover all possible use cases in a course.
In the 20 lectures and nearly 2 hours of new videos, my aim is to give you a good understanding of the most important concepts, that should help you whatever approach you then choose for your own projects.
Some of you may also remember that my original plan was to cover NextAuth.js, a popular library. However, version 5 (the one with full support for Server Components) is still in beta, and very much a moving target.
More importantly, I realised that simply showing how to configure a library wouldn't help people understand what's going on behind the scenes. That's why I decided to explain how to implement Authentication from scratch instead, using Cookies, JSON Web Tokens, and storing users' data in a database table.
For your own projects you could decide to use an open source library instead, or integrate with a third party Authentication Service, depending on your specific requirements. Either way, the new sections should help you better understand how those third party libraries work as well.
Happy coding!
Mirko
Comments
Post a Comment