Back to Social Login Support

core.teamelite21203
core.teamelite21203

I updated the system of Octobercms. Then it came up with this error on both web page and the backend page. How could I solve it ? It seems like I am stuck on the frontend and backend and can only go to the text editor to solve it. I tried the steps in stackflow. But none works.

subcortexx25152
subcortexx25152

I have exactly the same error when first installing the plugin. This broke my page and i have no idea how to fix it.

core.teamelite21203
core.teamelite21203

One of the developers shared to remove the plugin then re-install it. You can choose to delete the folder manually. Or you can use php artisan plugin:remove Flynsarmy.SocialLogin in command prompt. I tried command prompt but it didn't work for me so I manually deleted the folder. My pages got back.

thanhvd8925282
thanhvd8925282

You need running the following command in root folder to resolve that problem: composer require laravel/socialite 2.*

hambern
hambern

But that completely empties the backend folder, totally ruining the whole app

ribbsousa
ribbsousa

Run the command 2 times, the first it cleans, the second install again, and everything works!

mite.shterjov25809
mite.shterjov25809

composer require laravel/socialite 2.* did it for me

bashar.ayyash
bashar.ayyash

composer require laravel/socialite 2.* worked for me too!

oliverusselldev19870
oliverusselldev19870

I simply used this Laravel socialite command to install it:

composer require laravel/socialite

It worked for me. There was no issue with me. Check whether you have configured the controllers and route correctly for socialite in Laravel.

 /**

    * Handle Social login request

    *

    * @return response

    */

   public function socialLogin($social)

   {

       return Socialite::driver($social)->redirect();

   }

   /**

    * Obtain the user information from Social Logged in.

    * @param $social

    * @return Response

    */

   public function handleProviderCallback($social)

   {

       $userSocial = Socialite::driver($social)->user();

       $user = User::where(['email' => $userSocial->getEmail()])->first();

       if($user){

           Auth::login($user);

           return redirect()->action('HomeController@index');

       }else{

           return view('auth.register',['name' => $userSocial->getName(), 'email' => $userSocial->getEmail()]);

       }

   }
Route::get('/login/{social}','Auth\LoginController@socialLogin')->where('social','twitter|facebook|linkedin|google|github|bitbucket');

Route::get('/login/{social}/callback','Auth\LoginController@handleProviderCallback')->where('social','twitter|facebook|linkedin|google|github|bitbucket');

Here is what my controller and route looks like

1-9 of 9