In this episode, we kick off a new section focused on authentication, and we're using the tried-and-true Sentinel package for this purpose. Since we're not in a Laravel environment, there are a few extra steps to get everything running smoothly with our own framework. We'll get Sentinel installed, handle a few dependency issues, and set up everything in a way that's customized for our app.
You'll follow along as we adjust package versions to match dependencies, and learn why we shouldn't rely on the Sentinel facade throughout the app (hint: it's all about maintainability and flexibility!). Instead, we'll register Sentinel through a custom Auth Service Provider, pull out and use our own configuration file, and set everything up so we can access our authentication functionality cleanly from our IoC container.
On top of that, we'll update our database schema to match what Sentinel expects—dropping the old users table and running the SQL dump provided by Sentinel to create all the necessary tables (like users, roles, activations, etc.). Finally, we make a quick tweak in our homepage template so it’ll show user info as soon as we start registering new users.
Wrapping up, we confirm Sentinel is properly set up and ready to go. Next up, we'll be building out the registration flow for new users!