Страницы · Laravilt
Social Authentication
OAuth login with Google, GitHub, Facebook, and more
OAuth-based authentication with social providers like Google, GitHub, and Facebook.
Enable in Panel
php
Supported Providers
- GitHub
- Twitter/X
- GitLab
- Bitbucket
- Microsoft
- Apple
- Slack
Configuration
Environment Variables
env
Config File
php
User Model Setup
Add the social login trait to your User model:
php
Migration
php
Customizing Providers
Custom Icons
php
Provider Scopes
php
Profile Integration
Allow users to connect/disconnect social accounts:
php
Handling Callbacks
The package handles OAuth callbacks automatically. For custom logic:
php
API Reference
Panel Methods
| Method | Parameters | Description |
|---|---|---|
socialAuth() | array $providers | Enable social login |
Provider Configuration
| Key | Type | Description |
|---|---|---|
label | string | Button label |
icon | string | Lucide icon name |
color | string | Button color |
scopes | array | OAuth scopes |