#LaravelLinkedInAPI
Explore tagged Tumblr posts
Text
Laravel 9 Socialite Login with LinkedIn Tutorial Example
The LinkedIn tutorial for Laravel social login or signin; In this detailed example, we'll show you how to create a LinkedIn login in a Laravel application from scratch using the Laravel socialite, Livewire, and Jetstream libraries. The key issue that we will cover with the socialite package in Laravel is Linkedin social login. With its OAuth provider techniques, the Socialite plugin makes the social login procedure simple. Not only is Linkedin Login or signin integration simple in Laravel. Other social platforms, on the other hand, may be implemented far more rapidly and easily. You must create or generate the linkedin client id and secret in order to integrate Linkedin social login in Laravel. You must have a linkedin account and be logged in with your linkedin credentials. You may go to the LinkedIn developer console and get the client id and secret keys, which you can then inject into the Laravel project to make the two platforms work together.
Laravel 9 Social Login with LinkedIn Example
Table of Content
- Set Up Laravel Project - Make Database Connection - Install Jetstream Library - Configure Socialite Package - Add and Migrate LinkedIn Property in Users Table - Add LinkedIn Client ID and Secret - Prepare Controller - Define Routes - Set Up Login View - Start Laravel App
1. Set Up Laravel Project
You must first install the composer package on your machine before running the command to install the laravel app: composer create-project laravel/laravel --prefer-dist laravel-linkedin-login-example
2. Make Database Connection
Then, in the .env file, enter the database information: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=db_name DB_USERNAME=root DB_PASSWORD=
3. Install Jetstream Library
The final step is to install the JetStream package in Laravel, which provides you with pre-defined authentication templates that are powered by Tailwind CSS: composer require laravel/jetstream Execute the following command to generate ready-to-use authentication templates: php artisan jetstream:install livewire Next, run the following command to install the necessary npm packages: npm install npm run dev Then, with the following command, run migration: php artisan migrate
4. Configure Socialite Pacakage
To add the socialite package to Laravel, switch to the command line tool and run the following command: composer require laravel/socialite As seen below, register socialite classes in the config/app.php configuration file: .... .... 'providers' => , 'aliases' => , .... ....
5. Add and Migrate Linkedin Property in Users Table
To manage linkedin sign-in, we need to add a new field to the existing user table, so first create the migration file: php artisan make:migration add_social_auth_id_field Then, in the database/migration/add_social_auth_id_field.php file, add the new table values: Read the full article
#LaravelLinkedInAPI#LaravelLinkedInlogin#LaravelLinkedInoauthexample#LaravelloginwithLinkedInaccount
0 notes
Link
How to use the Laravel socialite, Livewire, and Jetstream libraries to create a LinkedIn login system from scratch in Laravel.
0 notes