Download the PHP package tea-software/secure-socialite without Composer
On this page you can find all versions of the php package tea-software/secure-socialite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tea-software/secure-socialite
More information about tea-software/secure-socialite
Files in tea-software/secure-socialite
Package secure-socialite
Short Description Secure, stateless OAuth state handling for Laravel Socialite
License MIT
Informations about the package secure-socialite
SecureSocialite
Secure, stateless OAuth state handling for Laravel Socialite with enhanced security features.
Description
SecureSocialite provides a robust solution for handling OAuth authentication in Laravel applications using Socialite. It implements secure, encrypted state parameters with automatic expiration and domain whitelisting for callbacks, helping protect your application against CSRF and redirection attacks.
Installation
You can install the package via Composer:
The package will automatically register its service provider if you're using Laravel's package auto-discovery.
Configuration
Publish the configuration file:
This will create a config/secure-socialite.php file with the following contents:
Update the whitelist array to include all domains that are allowed to receive OAuth callbacks. This helps prevent open redirect vulnerabilities.
Usage
SecureSocialite provides a secure way to handle OAuth authentication flows with Laravel Socialite.
Basic Example
The package handles the OAuth flow with the following security features:
- State parameters are stored securely with encryption
- Automatic expiration of state tokens (5 minutes)
- Domain whitelisting for callbacks
- Stateless implementation for better horizontal scaling
Routes
The package automatically registers the following routes:
GET /auth/social/redirect- Initiates the OAuth flowGET /auth/social/callback- Handles the OAuth callback
Requirements
- PHP 8.0+
- Laravel 8.x or higher
License
The MIT License (MIT). Please see License File for more information.