So a very small update here, because we've created out a dedicated page, a new page for signing in, when we redirect if we're not authenticated, this is going to go over to the standard page to sign in. So as an example, if we try and access the dashboard when we're not logged in, this is going to redirect us over to the standard email and password flow.
00:20
So what we can do is very easily change this with the authenticate middleware. So let's go over to the authenticate middleware and app HTTP middleware. And as you can see, if the user is not signed in, we redirect to so all of the functionality of this is behind this base middleware, we redirect to login. Now, all we need to do to update this
00:42
is change this over to our own route, which we know if we just double check the name of it is auth and index. So let's change that to auth and index. And we're pretty much done. So now, if we are over on our homepage, and we try and access the dashboard, we're redirected over to our new page. And of course, we can click to sign in.
12 episodes•1 hr 4 mins•1 year ago
Overview
Need to add social authentication to your Laravel apps? It’s almost zero effort using Laravel Socialite.
We start with the basics, add authentication with one provider, then use a design pattern to make adding additional services a breeze.