In this quick video, we make a small but important change to our authentication flow. Previously, when unauthenticated users tried to access protected pages (like the dashboard), they were always redirected to the default email and password login page. Now that we've set up a new, dedicated sign-in page (which supports social authentication), we need to make sure users land there instead.
We head into our authentication middleware—which handles redirection for unauthenticated users—and simply update the redirect route to our new sign-in page. After this tweak, whenever someone accesses a restricted page without being logged in, they're taken directly to our custom authentication page, offering a smoother, more integrated sign-in experience.
That's it for this episode—super quick, but it improves the flow for all users going forward!