Login with Google and Facebook account in Python/Django |All-Auth Social Login Authentication | API

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there what is up everybody welcome back soon in the video and today we will be looking at how to login by using Google and social login so we will be using a library called Django a lot in this video I have already set up a project named social login which add user in it now you can find the link to it in the description down below so first of all the app install the library and just stop the server okay type in tip and install single or what you five already installed on earth you need to install a ok the next thing you have to do is to go to the settings slope I file I've already included my local Ibiza here so you need to include so single dot contribute dot sights and divide it that you have to also add site ID such I equal 1 we will set the moment and next thing tomorrow you have to include some ads required by all those common talk a lot so these will be first of all a lot itself next will be a large dot account last but not least all of the social accounts okay the account will handle all the login system next thing you have to include are the providers providers are the Facebook and Google so I'm just cutting edge to be brought providers dot Facebook and in same way you can add who looking good the last thing you have to do this will include the URL pattern so I will type in actually clutter URLs by a lot switching the accounts slash and you can actually find all of these in the description you can just copy those alright last thing is to run the migrate command okay we are one in the migrations now now we will go to the admin panel okay it's narrowed in settings and its social count so social accounts which is social count so now we'll go to the admin panel and make some social applications there you you [Music] I'm running the server you all right great yes running move to the end ow log in here now you can see the additional panels here settle accounts moves through the social applications and create one by clicking here you if you select the providers we included the providers so that Facebookers you can name it anything you file image Facebook supplying Ali what is a quadratic you do not have a blank idea but we will get one in a moment move to Facebook developer well personal facebook calm you so you can create your ad or social application by clicking on my pass and create ad you so you can image anything Parliament jungle social Walden as yeah I'm not a robot okay this so client ID is written right here the app ID is actually the point ID please sit here now what about the client secret of the secret key you okay it is your pad secret or client secret or secretly whatever you want to call it and just another check for the legitimate user purchase this copy it and paste a secret key all right it's let other sites or the site at which you will use it okay the last thing to do in the admin panel is to change the site name go to sites you change the name to whatever you are using like here I'm using localhost you are using your IP address you have to change it to that [Music] and great just is welcome looking good not if I level from here move to my side you can see it does not do anything yet but we will fix that in a moment so go to the template and add a couple of template tags these two you can find these in the description and what about the link here okay you wanna paste this link here okay these Facebook provide see two methods one is or two and the other one is je s SDK so I'll show you the other one as well all right we load it and Bank okay well it is giving us an arrow because of because it is redirecting to this URL and we had and we do not have this page setup yet so I will just change it in the settings by adding [Music] login redirect URL alright see it make today a killing that me ad can use it so it will show my username that this person is looking okay so it is showing doneness user because I am not working yet so you go to Facebook log in again oh geez I believe to put a backslash here you so here you can see I am logged in okay so let's try the other metric the GS s DK 1 in CS underscore s DK so what it does it just pops up screen right here instead of opening a new tab or the old no [Music] you can see I'm still logged in here let me just love all first finally to the ending battle Logan you small launch okay so now it just opens up this window and Bank I'm logged in as my name all right now let's try to do one the in the same way you have to move to Google console for developers you alright go ahead and create a new project you can omit anything but a little bit whatever it is you so this is creating so now we have to get a credential the client ID and the client secret are the financials all right move to the sidebar and go to potentials you you you create credentials and always client ID because you need the client ID and it's on this warning that we have not set our consent screen yet so we'll quick add it it is basically the screen that will be shown on the login page and here you have to name your application or your project I will call it social login you can name it anything and also add a logo here okay we need it for web application and again you can name client ID whatever you want okay the URL that we need is this one I just paste it here okay and copy the domain names okay all right if you're using localhost instead of your IP address so you will have to add on local question [Music] localhost alright we are quite done here just copy your client ID okay now we have to create a social application first the same way we did for Google sorry Facebook and social application and startup right of Google and you put the Google login login basic I here means lecture site save it alright looking good does not do anything yet because we have not included link so I'll just copy this one and paste it above change it to Google and remove methods and right save it and check it out [Music] all right this is my username so we have logged in boom
Info
Channel: Shahzaib Ali
Views: 30,812
Rating: 4.8828125 out of 5
Keywords: django, django python, social login, social login in django, allauth, google login api, oauth, login with google, login with facebook, web development, api, django authentication, django google authentication, django google login, django tutorial, django web development with python, google login, django login google, django login and registration, django social auth, all auth, how to login with google in django, how to login with facebook in django, django all-auth
Id: -TUEM2NCuVE
Channel Id: undefined
Length: 14min 29sec (869 seconds)
Published: Mon Jul 29 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.