Sign in with google+ and facebook login in sign page of bagisto ecommerce
-
Hi,
Your route is as -
Route::get('login/google', 'Webkul\Customer\Http\Controllers\SessionController@redirectToProvider');
Route::get('login/google/callback', 'Webkul\Customer\Http\Controllers\SessionController@handleProviderCallback');
but redirect is -
'redirect' => 'http://localhost/vayathi/login/google/callback',
but it should be - 'redirect' => 'http://localhost/login/google/callback',
link is given -
<a href="http://localhost/vayathi/login/google">Login in with Google+</a>
but it should be, according to route -
<a href="http://localhost/login/google">Login in with Google+</a>
& Make sure your redirect url given during OAuth client ID creation ( https://prnt.sc/oe1th1)
For More reference follow this link to implement it - https://medium.com/employbl/add-login-with-google-to-your-laravel-app-d2205f01b895
Thanks
-
Hi,
If anyone created sign in with google+ or facebook then please send me the source code.
Actually I have created redirectToProvider() method and handleProviderCallback() method in SessionController, is it correct or not, I don't know. And I have created routes in pakages/Webkul/Shop/src/Http/routes.php
My project root URL is http://localhost/vayathi
Please any one can suggest me. Thank You.
-
Hi,
You can clone from this repository in which we have implemented socialite in bagisto.
link - https://github.com/rahulshukla-webkul/bagisto-socialiteThanks
-
Hi,
Thank you so much, now login with google+ is working fine. It shows users token, so now I need to redirect this to any other page instead of showing user token or user name etc.
-
Hi,
You can use it according to your need & don't use given google (client_id, client_secret) credentials, because we are going to delete this one.
Thanks
-
Hi,
I have created google (client_id, client_secret) credentials in my machine. I have tried with return redirect()->route('customer.session.index'); but not working.
-
Hi,
I am not getting you, can you elaborate more.
Thanks
-
Hi,
Can you give any example to redirect to any other page after login with google+
public function handleProviderCallback()
{
$user = Socialite::driver('google')->user();**return $user->name;** }
-
Hi,
What is happening ?
-
Hi,
It is showing only user name but I need redirect to another page, can you give me redirect route after login with google+ successfully.
-
Hi,
Place your redirect route in 'handleProviderCallback' method & you will be redirected accordingly.
For more reference, please see this one - https://medium.com/employbl/add-login-with-google-to-your-laravel-app-d2205f01b895
Thanks
-
Hi,
Now sign in with google+ and facebook is working fine for me, but after successfully sign in with google+ also sign in button is showing below account drop down instead of logout button. Please refer below is the screen shot for this problem. can anyone give me the solution to sort out the issue, thank you.
-
Hi,
In 'handleProviderCallback' method, when you got data from source(ex-google
) then you need to implement login functionality according to that data & you are missing this.
So, Kindly take pull from this repository - https://github.com/rahulshukla-webkul/bagisto-socialite.
We have implemented this one here.Thanks
-
Hi,
Thank you so much............! Now everything working fine regarding sign in with google+
-
@rahul after add "laravel/socialite": "^3.2.0" and run "composer update" command then showing error Class 'Laravel\Socialite\SocialiteServiceProvider' not found
-
You need to run add this service provider in your applications app.php file of config folder.
Please go through with this article - https://medium.com/justlaravel/laravel-social-login-using-socialite-45305c7ddc00
Thanks
-
@rahul Thanks
It's working for me.
one more query is How to create a Carousel in a custom theme? -
Hello Damayanti Nama,
You may refer to below link for adding carousel component
https://forums.bagisto.com/topic/1186/add-carousel-component-vuejs-into-bagisto/2 -
when I am login through google it was redirecting me back to login page
Here's my google callback url
GOOGLE_CALLBACK_URL=http://127.0.0.1:8000/customer/social-login/google/callback
-
Hello @tayyab
Greetings of the day..!!
For this, you have to create your credentials first and then make changes in the .env file which is present in the root directory of Bagisto.
Kindly go to this URL -> https://console.cloud.google.com/apis/credentials/oauthclient
Add your callback URL in Authorised Redirect URL section as shown in the below image.
After that just go to the login page and click on the Google icon.
Thanks & Regards..!!