laravel-socialite

Laravel socialite $user->getId()?

99封情书 提交于 2019-12-23 19:03:43
问题 I'm not sure if this is what is really causing my issue, but perhaps someone will know. When I use Laravel Socialite and go: $social_user = Socialite::driver($provider)->user(); Then somewhere else in my code is do this: if ($authUser = User::where('provider_id', $social_user->id)) return $authUser; For some crazy reason I get an error like this: Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, instance of

Laravel Socialite 2.0 Facebook Authentication only returning id and name

笑着哭i 提交于 2019-12-19 08:56:52
问题 I am using Laravel's Socialite package (version 2.0.0). It is working great for google and github but when I try to login with facebook, I get this: ErrorException in FacebookProvider.php line 89: Undefined index: first_name In the FacebookProvider.php the error is from this method: protected function mapUserToObject(array $user) { return (new User)->setRaw($user)->map([ 'id' => $user['id'], 'nickname' => null, 'name' => $user['first_name'].' '.$user['last_name'], 'email' => isset($user[

Using Laravel Socialite to login to facebook

蓝咒 提交于 2019-12-17 10:24:30
问题 I am new to Laravel however and I am following the tutorial on http://www.codeanchor.net/blog/complete-laravel-socialite-tutorial/, to login a user through Facebook into my application. However, almost everywhere I find a tutorial using either Github or Twitter for the Socialite Plugin provided in Laravel. My problem is that on following everything in the tutorial, as I click on the "Login to Facebook" button, it throws an "Invalid Argument Exception" with No Socialite driver was specified.".

socialite laravel authantication error with google API

早过忘川 提交于 2019-12-17 10:01:31
问题 I have been using Socilte package for users login, i m using facebook , google , twiter and github API. All other API's are working fine expect google API, it is showing an error while returning from google. HTTP Error 403 - Forbidden The Web server is configured to not list the contents of this directory or you do not have enough permissions to access the resource. This is my callback function, in fact it is not reaching this callback function: public function handleGoogleCallback() { $user

How to login using Github, Facebook, Gmail and Twitter in Laravel 5.1?

大兔子大兔子 提交于 2019-12-17 09:53:59
问题 I am trying to login using social sites in Laravel 5.1. I have installed socialite and following below tutorial: https://mattstauffer.co/blog/using-github-authentication-for-login-with-laravel-socialite http://tutsnare.com/social-authentication-in-laravel-5/ I have followed every step, when try to login using Github, it redirect to Github and after login it redirect to URL callback, but my problem is it won't store user data in my database. Update-1 Now my problem is how to authenticate user

Redirect to URL after login with Socialite in Laravel

Deadly 提交于 2019-12-13 19:06:05
问题 I need to register in a tournament with the URL: http://laravel.dev/tournaments/1/register/ This URL is in the middleware 'auth', so if the user is not logged, he is redirected to login page. What I need is to redirect to http://laravel.dev/tournaments/1/register/ After social login ( I have 2 providers, fb and google) In this case, I don't want the user to be redirected to the redirected url defined in .env This is the function I use to login with Socialite: public function execute($request,

Can't use socialite on lumen 5.2

点点圈 提交于 2019-12-13 08:34:12
问题 Here is my config socialite for lumen but I got error: Fatal error: Call to a member function set() on null Any idea? my AuthController namespace App\Http\Controllers; use Socialite; class AuthController extends Controller { public function redirectToProvider() { return Socialite :: driver('github')->redirect(); } public function handleProviderCallback() { $user = Socialite :: driver('github')->user(); dd( $user ); } } my Route.php $app->get('auth/github', 'AuthController@redirectToProvider')

The redirect_uri URL must be absolute facebook Laravel

♀尐吖头ヾ 提交于 2019-12-13 07:20:57
问题 I want to make login with facebook using Socialite in laravel. First I set the route function: Route::group(['middleware' => ['web']], function(){ Route::get('auth/facebook', [ 'as' => 'auth-facebook', 'uses' => 'usersController@redirectToProvider' ]); Route::get('auth/facebook/callback', [ 'as' => 'facebook-callback', 'uses' => 'usersController@handleProviderCallBack' ]); }); And then I make function in the user controller: public function redirectToProvider(){ return Socialite::driver(

Retrieve facebook user details with using socialite laravel

别说谁变了你拦得住时间么 提交于 2019-12-12 21:53:08
问题 I am using laravel version 5.4.36 and i am using Laravel Sociallite plugin to connect user with facebook. Now i want to get Logged in user information like birth date gender, Address, mobile number or any permissions given in this facebook official document. I have tried following code $facebookScope = [ 'user_birthday', 'user_location', ]; $facebookFields = [ 'name', // Default 'email', // Default 'gender', // Default 'birthday', // I've given permission 'location', // I've given permission

Laravel socialite 3.0 google return 403 - Forbidden

浪尽此生 提交于 2019-12-12 18:33:01
问题 I am using Laravel 5.6 and socialite 3.0. I have created google API from developer console and enable for Gmail API and google plus. please check screen shot. Also, I have to make setup inside .env file. Google callback return 403 error code I have created class and method public function redirect($provieder) { return Socialite::driver($provieder)->redirect(); } public function callback($provieder) { try{ $user = Socialite::driver($provieder)->stateless()->user(); if (isset($user)) { $social