Skip to content

Majid-Razzaq/Laravel-Facebook-Login

Repository files navigation

Laravel Logo Facebook Logo

Build Status Total Downloads Latest Stable Version License

Facebook Login with Laravel using Socialite

screencapture-localhost-8000-login-2024-09-18-09_44_35

Requirements

  • Laravel = 11.20.0
  • PHP = 8.2.12
  • Composer Version = 2.7.7

Getting Started

  • Clone the repository.
  • Run composer install to install dependencies.
  • Set up your database configuration in the .env file.
  • Run php artisan migrate to create the necessary database tables.
  • Customize the application as needed.
composer install
php artisan migrate
php artisan serve
npm install
npm run build

How to Use

  1. Install the Laravel Socialite package using Composer:
 composer require laravel/socialite
  1. Configure your config/services.php file with your Facebook app keys:

    'facebook' => [
    'client_id' => 'Your App ID', 
    'client_secret' => 'Your App Secret',
    'redirect' => 'http://localhost:8000/auth/facebook/callback',
    ],
    
  2. Create a Facebook app here (https://developers.facebook.com/apps), and copy the App ID and App Secret into the above configuration.