Skip to content

Majid-Razzaq/Laravel-Github-Login

Repository files navigation

Laravel Logo GitHub Logo

Build Status Total Downloads Latest Stable Version License

Github Login with Laravel using Socialite

screencapture-localhost-8000-login-2024-09-18-23_30_25

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 Github app keys:

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