Category : laravel-socialite

i want to login with facebook, i create laravel authentication, i add button login with facebook, i install laravel socialite package by command composer require laravel/socialite, i add configuration in config/services: ‘facebook’ => [ ‘client_id’ => env(‘FACEBOOK_CLIENT_ID’), ‘client_secret’ => env(‘FACEBOOK_CLIENT_SECRET’), ‘redirect’ => ‘http://localhost:8000/laravel-socialite/public/login/facebook/callback’, ], I added in routes/web.php the routes: Route::get (‘login/facebook’,[AppHttpControllersAuthLoginController::class, ‘redirectToFacebook’])->name(‘login.facebook’); Route::get(‘login/facebook/callback’,[AppHttpControllersAuthLoginController::class,’handleFacebookCallback’]); I ..

Read more

i’m trying to sign in using ios account with flutter mobile app with laravel backend.i’m using socialite .and I’m getting this error when sign in "message": "The JWT string must have two dots", "exception": "LcobucciJWTTokenInvalidTokenStructure", "file": "/var/www/html/incentiwise-debug.tk/incentiwise-be-new/vendor/lcobucci/jwt/src/Token/InvalidTokenStructure.php", "line": 13, This is my code $user = Socialite::driver($request[‘type’])->stateless()->userFromToken($request[‘token’]); $databaseUser = AccountHelper::findAccount($user->email); if ($databaseUser == null) { return ..

Read more

I am new to GoogleAPIs and Laravel, I run a PHP web application on Laravel 8 in a virtual Linux environment. Socialite and Drive API was working fine and out of sudden it doesn’t work anymore and always return connection refused error after long period of loading as follows: GuzzleHttpExceptionConnectException Connection refused for URI https://www.googleapis.com/oauth2/v4/token ..

Read more

I have installed laravel packages on staging server and packages working fine. But when i take pull on staging server, it is showing me error that package class not found. Steps I have followed to resolve issue I have check in vendor folder as well as in config/app.php, but I got class declaration and package ..

Read more

Context I have a Laravel 8 API and a Vue 2 frontend on separate repos and separate domains. I have implemented Facebook login using Laravel’s Socialite package. I’ve implemented facebook login correctly as I’m able to retrieve user’s data from facebook. The auth flow is as follows: User clicks on continue with facebook button (I’m ..

Read more

is there a way to check if the user has logged in with a Socialite? because i want to create a post based on this authentication. what i have done if (!empty(Socialite::driver(‘linkedin’)->stateless()->user())) { $linkedinuser = Socialite::driver(‘linkedin’)->stateless()->user(); dd($linkedinuser); } return redirect(‘/profile/’); i expect to get the dump if user has authenticated with linkedin, or else return ..

Read more

In my Laravel-8 Application, I have used: ‘Socialite’ => LaravelSocialiteFacadesSocialite::class, For social Login: public function redirectToProvider() { return Socialite::with(‘azure’)->redirect(); } public function handleProviderCallback() { $azureUser = Socialite::with(‘azure’)->user(); try { $user = User::where(’email’, $azureUser->email)->orWhere(‘username’, $azureUser->user[‘mailNickname’])->first(); if($user) { if(Auth::loginUsingId($user->id)) { $user->update([ ‘last_login_at’ => now(), ]); return redirect()->route(‘dashboard’); } } } catch(Exception $e) { session()->flash("error", "Authentication failed, kindly ..

Read more

I am new to Laravel Socialite Login. In my Laravel-8 Application, I have used: ‘Socialite’ => LaravelSocialiteFacadesSocialite::class, for Azure Socialite Login, which works for the multi-company Login. I store the company id in Session. public function getCompanies() { $current_domain = request()->getHost(); // your company app name $domain = explode(‘.’, $current_domain); return OrgCompany::where(‘subdomain’, $domain[0])->firstOrFail(); } public ..

Read more

I’m trying Laravel 8 Jetstream with Laravel Socialite. The problem is when I retrieve the avatar and use its URL to profile_photo_path. The blade file appends http://localhost:8000/storage/ that is causing the avatar not to display. screenshot here I have enabled jetstream’s profile photos on config/jetstream.php ‘features’ => [ Features::profilePhotos(), Features::accountDeletion(), ], Here’s how I store ..

Read more

I want to use facebook extras feature on laravel socialite. However I cannot find how to implement it on my controller. class SocialiteController extends Controller { public function show() { return Socialite::driver(‘facebook’) ->scopes([‘whatsapp_business_management’, ‘business_management’]) ->redirect(); } } Is there a way I could implement the extra feature like this? return Socialite::driver(‘facebook’) ->scopes([‘whatsapp_business_management’, ‘business_management’]) ->extras([‘feature’ => ..

Read more