Now, in this lecture, let's try to integrate social login into our easy bank application with the
help of GitHub identity provider.
If you observe the current login page, the user can only enter his username and password.
But there is no option off social login like guitar bar or Facebook in order to integrate social login
into my login page of my eastbank application.
I can go to the key club admin console.
Go to the identity provider.
Select the option which you want to integrate.
In this scenario, since I want to integrate GitHub login, so I'm selecting GitHub.
So here it will ask you give me your client TTY and client secret, which you have received from the
guitar while registering your client with it.
So if you can recall in the previous section, we did a GitHub integration at the time.
We have a client ID and client secret.
So we need to mention the same here.
So if you can go to our GitHub profile, there is a settings option under settings.
You can select developer settings.
Click on what apps?
So you can see I have an app right now.
I'm just clicking that.
So here my client I.D. So-and-so and Clancy Grant, I already saved it when I'm restring very first
thing.
So I have my client data and client secret in my hand.
If you want, you can upload the logo here, application name.
You can rename it to like instead of spring security or two, you can mention Easy Bank as an application
name.
So homepage URL is localhost 4200.
Now coming to authorization callback, you are.
If you go to the admin console, your key clock is telling.
Go and use this UALE as you redirect to Aurel.
So I have to copy paste this and mention here and add the GitHub.
So I'm just clicking update application.
So now I have done all the changes that I needed on the GitHub auth app.
So here I just have to argue the client I.D. I'm just mentioning my client I.D. and client secret.
Now I can go and click siel.
So with this, I should be getting Noyer GitHub login option also inside my easy bank application.
So let's see that magic.
So let me go to the localhost, four thousand two hundred.
So if I click a login here, you can see along with the username and password right now, it is also
giving an option of GitHub login.
So if I click GitHub login, it will ask you, these are the user details that I received from the GitHub.
So please fill other details which are mandatory in my system.
So first name I'm giving easy.
Last name I'm giving bytes.
So as soon as I click submit, a user is created inside key blocks of work.
But don't expect the password.
Details of GitHub will be stored inside Kikla.
That will never happen.
So whenever I click GitHub, option key Cluck's server will go and try to get ID and authorization from
the GitHub.
Once the user details are validated, it will show the dashboard page.
But in this scenario, since GitHub does not, giving the rules at my page is expecting, which is admin
and user, I'm not able to display anything to the user.
So let's try to remove our roles restriction for dashboard in the UI court.
So here for Dashboard, I'm removing the roles restrictions that we have.
With this, I'm saving and rebuilding the application.
So now I'm clicking login so you can see I'm getting the dashboard details because there is no role
requirement right now.
We have.
And of course, one of the drawback that we'll have when we use social logins is they don't share the
information like the way we expect.
Like in this scenario, for my application, I'm expecting rules to be written from the authorization
server, but I can't do that customization at GitHub alteration, so I have to leave it the water GitHub
be sharing to me.
So due to that reason, whenever you have a custom requirements, never, ever go with the social logins
instead defined, you are one requirements in, say, identity and access management products like Dekalog,
Log, Opta.
But for now, I just integrated for your reference how quick log is going to provide those out-of-the-box
features for your login page.
I can show one more time.
Also, I'm just clicking logout.
So this time I open the homepage inside the Incognito tab.
So I'm just clicking login.
So if I click GitHub, it is asking me.
You are about to use the easy bang with the help of GitHub attrition details.
So I have to give my username, which is easy bytes and the password of my account.
So as soon as I click sign in, you can see my key clocktower will redirect me to the dashboard.
But definitely, I can't use any of these tabs because I don't.
Power roles coming from my GitHub operations are what whereas if I tried to log in with the geek log
alteration server, definitely I how the roles that I'm expecting and I can use my eastbank application
happily.
And one more last thing that I want to show you.
Banora on user uses GitHub and tries to login with the GitHub.
You will get his user details created inside Kikla culture.
This is because GitHub is fine to share my profile details with the easy bank application.
That's why I'm able to get the basic details of the user from the GitHub.
But never, ever, I'll get the password of the user every time my access token refresh tokenize expired.
My user how to do again in login operation with GitHub by entering its corrective credentials so that
we might log on to easy bank application.
Always have an access token which they can use for authentication and alteration purpose.
Hope you are very clear how easy it is to integrate any social login with the key blocks over inside
the login page.
If you want, you can disable it or deleted permanently without breaking off.
Delete edit options here for now and just clicking delete.
So this will delete the login operation using GitHub.
I can also come from by going to login page again.
So now and clicking login.
This time there is no GitHub login option to the user.
So this way we can integrate any social login to your website with the help of Keflex out very easily.
And of course, every identity and access management products like OCTA for Job.
They'll also provide social login features.
Thank you.
And I'll see you in that next lecture.
Bye.