Let's Learn AdonisJS 6: Ep 7.6 - Protecting Routes with Auth, Guest, and Admin Middleware

Опубликовано: 23 Декабрь 2024
на канале: Adocasts
463
15

Learn about auth, guest, and how to make an admin-only middleware

👍 If You Enjoy This Video, Consider Hitting The Like Button!

👨‍💻 Series Source Code: https://github.com/adocasts/lets-lear...

🥁 Subscribe To Stay Notified For New Videos: https://www.youtube.com/adocasts?sub_...

Subscribe to Adocasts Plus to gain access to all our lessons and more!
https://adocasts.com/pricing

In this lesson, we'll learn about the auth and guest middleware included when we created our AdonisJS 6 project. Then, we'll create our own named middleware that will allow us to restrict page access to only users with the admin role.

⏰ Timestamps
00:00 - Guest Middleware Demonstration
00:30 - Guest & Auth Middleware Purpose
00:45 - Creating An Admin Route Group
01:37 - Restricting Admin Section To Authenticated Users
02:57 - Creating Our Admin Named Middleware
04:52 - Testing Our Admin Named Middleware

------------------------- Socials --------------------------

Website: https://adocasts.com
Threads: https://threads.net/@adocasts
Twitter:   / adocasts  
GitHub: https://github.com/adocasts