Finally, we can now protect our routes using authentication!
It’s a fairly simple update to change our middleware to also check for a logged in user. Now we can freely access Chapter 1, but any other lessons require us to be logged in with Github. Once we build our checkout we’ll be able to restrict access only to those who have bought.
We also implement a UX improvement. If we redirect to the login page, we’ll redirect back to where the user was trying to go after they’ve logged in.
18 lessons
7 lessons
7 lessons
11 lessons
18 lessons
8 lessons
17 lessons