Playing
01. Introduction and demo

Transcript

00:00
in this course I'm going to guide you through everything you need to set up social authentication
00:03
within your Laravel apps and we're going to do that with Laravel Socialite which is a first party Laravel package which allows you to integrate with any of the OAuth providers that you usually would sign in with, now the one thing about social authentication is that there are a couple of additional things that we also need to take into account and we're going to be
00:25
doing them a little bit later on in the course what we're also going to be doing is looking at a really nice pattern that we can use to very easily integrate lots of different providers so we're going to be rolling with just integrating two of these but if you want to add more later you don't want to be creating controllers and routes for every single implementation here
00:46
ideally you want a way to very easily do this with just a simple class so we're going to be covering that as well, okay let's take a look at a demo of this and see how it looks so I've got an app here at the moment and I don't have any users in the database let's go ahead and sign in with X first of all of course this is going to go ahead and bring up the X or Twitter website
01:05
and we can authorize this app and we're redirected back to our own app, now at the moment I've turned on email verification which is one of the things that we're going to be looking at in here and that will have sent me an email, now just for now so we can get around this I'm going to go ahead and just set this in the database and once you've done that by email which we will be covering you are
01:24
now logged in with all of the details from that service so that's created an account with everything that you need, now what we can also do here is still update our password so the social authentication here will hook us up with the XID of this particular user so if we wanted to access the API later we could but if we want to go ahead and update our password so a bit later on we can
01:47
sign in just with an email and password that's been pulled over from this service we can do that as well so updating the password here will still work and there's a couple of things that we need to do to get around that, so that is to be honest pretty much it this looks very very simple but like I said we're going to use that pattern a little bit later to make integration of any
02:07
additional services really really easy and we'll be looking at two examples here X and GitHub just to get you started, okay so that's pretty much it let's head over to the next episode where we just get everything set up so we're ready to go and then we'll start integrating social authentication in Laravel.
12 episodes1 hr 4 mins

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.

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Episode discussion

No comments, yet. Be the first!