Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Sign in with google+ and facebook login in sign page of bagisto ecommerce

    General Discussion
    3
    4
    951
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Keerthi last edited by

      Hi, can anyone tell me about sign in with google+ and facebook login in sign page of bagisto ecommerce, I have tried with google+ but I am getting like this (404 The Page you are looking for does not exist or have been moved. Navigate using sidemenu.), Please If you have source code then send it to me,Thank You.

      config/app.php

      I have added Laravel\Socialite\SocialiteServiceProvider::class, in providers and 'Socialite' => Laravel\Socialite\Facades\Socialite::class, in aliases

      pakages/Webkul/Shop/src/Http/routes.php

      Route::get('login/google', 'Webkul\Customer\Http\Controllers\SessionController@redirectToProvider');
      Route::get('login/google/callback', 'Webkul\Customer\Http\Controllers\SessionController@handleProviderCallback');

      SessionController.php (I have added below two methods)

      public function redirectToProvider()
      {
      return Socialite::driver('google')->redirect();
      }

      /**

      • Obtain the user information from GitHub.

      • @return \Illuminate\Http\Response
        */
        public function handleProviderCallback()
        {
        $user = Socialite::driver('google')->user();

        return $user->token;
        }
        In pakages/Webkul/Shop/src/Resources/views/customers/session/index.blade.php

      <a href="http://localhost/vayathi/login/google">Login in with Google+</a>

      config/services.php

      'google' => [
      'client_id' => '947267311128-oaohbld4bfs3uph6oavkleotd45rmhe3.apps.googleusercontent.com', // Your GitHub Client ID
      'client_secret' => 'L8GXzQHkoQYAtDEQPo-lFe6N', // Your GitHub Client Secret
      'redirect' => 'http://localhost/vayathi/login/google/callback',
      ],

          0
      
      1 Reply Last reply Reply Quote 0
      • R
        rahul last edited by

        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)

        Thanks

        1 Reply Last reply Reply Quote 0
        • R
          rahul last edited by

          For More reference follow this link to implement it - https://medium.com/employbl/add-login-with-google-to-your-laravel-app-d2205f01b895

          1 Reply Last reply Reply Quote 0
          • A
            Aaradhya1900 last edited by

            thanks, its very helpful

            1 Reply Last reply Reply Quote 0
            • First post
              Last post