A Laravel 12 based system that integrates multiple social platform logins and team management features. The system supports binding multiple social accounts to a single user account and provides comprehensive account management functionality.
- Support for multiple social platform logins:
- GitHub
- LINE
- Single account can bind multiple social platforms
- Flexible social account management:
- Bind new social accounts
- Unbind existing social accounts
- Login with any bound social account
- Automatic personal team creation
- Team member management
- Team invitation system
- Profile management
- Password updates
- Two-factor authentication
- Social account binding management
- Multi-browser session management
- Account deletion
- PHP >= 8.2
- Laravel 12.x
- Composer
- Node.js & NPM
- MySQL/PostgreSQL
- Clone the project
git clone https://github.com/your-repository/laravel-social-auth.git
cd laravel-social-auth
- Install dependencies
composer install
npm install
- Environment setup
cp .env.example .env
php artisan key:generate
- Database setup
php artisan migrate
- Social platform configuration
Configure the following parameters in your
.env
file:
# GitHub
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
GITHUB_REDIRECT_URI=your-github-callback-url
# Google
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=your-google-callback-url
# LINE
LINE_CLIENT_ID=your-line-client-id
LINE_CLIENT_SECRET=your-line-client-secret
LINE_REDIRECT_URI=your-line-callback-url
- Start development server
php artisan serve
npm run dev
app/Contracts/Services/SocialiteService.php
: Social login service interfaceapp/Services/SocialiteManager.php
: Social login implementationapp/Models/SocialAccount.php
: Social account model
app/Http/Controllers/Auth/SocialiteController.php
: Handles social login flowapp/Livewire/Profile/SocialAccountsForm.php
: Social account management interface
resources/views/auth/login.blade.php
: Login pageresources/views/profile/show.blade.php
: Profile pageresources/views/livewire/profile/social-accounts-form.blade.php
: Social account management form
The system supports multiple languages, currently including:
- English (en)
- Traditional Chinese (zh_TW)
Language files are located in the lang
directory.
# Start development environment (includes server, queue listener, log monitoring, frontend compilation)
composer run dev
# Code style check
./vendor/bin/pint
# Run tests
php artisan test
This project is licensed under the MIT License. See the LICENSE file for details.