Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 2.22 KB

README.md

File metadata and controls

83 lines (55 loc) · 2.22 KB

Social Login for Laravel

This package adds a social login component that can be used to log users using linkedin

Features

  • Log the user using Linkedin

Requirements

To use this package you need to create a linkedin application and get the following creadentials

  • LINKEDIN_CLIENT_ID
  • LINKEDIN_CLIENT_SECRET

Create a linkedin app

Watch the video below for a step by step guide on how to add a linkedin login to your laravel app using this package.

How To

You can find the instructions to create a new linkedin app in the official documentation here

✅ Services to enable:

When you create the linkedin app you need to activate the following services in the Products tab:

Usage

Install the composer package:

The first step is to install the package in your laravel application.

composer require pacificdev/social-login-for-laravel

Add the social login component in the login and register pages as shown below

// login.blade.php
<x-pacificdev::social-login />
// register.blade.php
<x-pacificdev::social-login />

Add the linkedin service

#config/sercives.php
 'linkedin-openid' => [
        'client_id' => env('LINKEDIN_CLIENT_ID'),
        'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
        'redirect' => env('LINKEDIN_REDIRECT_URL', '/linkedin/auth/callback'),
    ],

Publish the package files

If you need to make changes to the package config file, views or migrations you can publish them using the following commands:

# publish the config file
php artisan vendor:publish --tag=pacificdev-social-login-config
# publish the views
php artisan vendor:publish --tag=pacificdev-social-login-views
# publish the migrations
php artisan vendor:publish --tag=pacificdev-social-login-migrations

Roadmap

  • Linkedin Login
  • Google Login