tastyigniter/ti-ext-socialite
TastyIgniter Socialite extension adds social login/registration for customers via Laravel Socialite. Supports Facebook, Google, Twitter and more, with an extensible adapter-based approach and customizable integration for your TastyIgniter site.
SocialiteRegistered, SocialiteFailed) for extensibility, allowing custom logic without monkeypatching. This aligns with Laravel’s dependency inversion principle.users table structure. The package includes migrations for socialite_users and related tables, but schema conflicts may arise if the app uses non-standard user models.Key Fit Criteria: ✅ Ideal for: Laravel/TastyIgniter monoliths needing social login with minimal dev effort. ⚠️ Partial Fit: Projects requiring deep customization of OAuth flows (e.g., custom token storage, non-standard scopes) may need to extend the package significantly. ❌ Non-Fit: Non-Laravel stacks, microservices architectures, or apps with headless auth (e.g., API-only backends).
.env and publishing config files.users table with standard Laravel fields (email, name, password).socialite_users and socialite_providers tables for provider-specific data.varchar length constraints in v1.5.3).Feasibility Score: ✅ High for greenfield Laravel/TastyIgniter projects with standard user models. ⚠️ Medium for legacy systems or apps with custom auth logic. ❌ Low for projects requiring schema-free or NoSQL backends.
| Risk Area | Severity | Description | Mitigation Strategy |
|---|---|---|---|
| Provider API Changes | High | Upstream providers (e.g., Facebook, Google) may deprecate endpoints or scopes. | Monitor Socialite Providers for updates. |
| User Data Mapping | High | Mismatched fields (e.g., email_verified vs. email) can break registration. |
Validate provider field mappings in tests; use event listeners for transformations. |
| CSRF/Session Attacks | Medium | OAuth flows are vulnerable if CSRF protection is misconfigured. | Enforce Laravel’s VerifyCsrfToken middleware; use state parameter in redirects. |
| Rate Limiting | Medium | Excessive API calls may trigger provider rate limits. | Configure .env limits (e.g., GOOGLE_RATE_LIMIT). Use caching for provider responses. |
| Migration Conflicts | High | Schema changes (e.g., varchar length increases) may conflict with existing DB. |
Run migrations in a staging environment first; use Laravel’s schema diff tools. |
| Third-Party Dependencies | Medium | Socialite Providers are community-maintained; some may lack updates. | Prefer providers with active maintenance (e.g., socialiteproviders/google). |
| Multi-Tenancy | High | Social logins may not respect tenant isolation in multi-tenant apps. | Scope provider sessions to tenant IDs; use middleware to validate tenant context. |
Critical Questions for TPM:
User model extend Laravel’s MustVerifyEmail or similar traits? If not, how will email verification be handled?SocialiteRegistered event).Compatibility Matrix:
| Component | Compatibility | Notes |
|---|---|---|
| Laravel Socialite | ✅ Full | Core dependency; ensures OAuth2 best practices. |
| TastyIgniter | ✅ Native | Designed as an extension; minimal setup required. |
| Custom User Models | ⚠️ Partial | May require trait overrides or event listeners for custom fields. |
| API-First Architectures | ❌ Limited | Assumes server-side rendering; not optimized for headless auth. |
| Non-Laravel PHP Frameworks | ❌ Incompatible | Tightly coupled to Laravel’s ecosystem. |
| Non-SQL Databases | ❌ Incompatible | Relies on Eloquent migrations and relational schema. |
Pre-Integration Phase:
users table will be modified (e.g., adding socialite_id fields).bcmath, cURL).Installation:
composer require tastyigniter/ti-ext-socialite
php artisan vendor:publish --provider="TastyIgniter\Socialite\SocialiteServiceProvider"
config/socialite.php) and migrations..env with provider credentials:
SOCIALITE_FACEBOOK_CLIENT_ID=your_id
SOCIALITE_FACEBOOK_CLIENT_SECRET=your_secret
SOCIALITE_GOOGLE_CLIENT_ID=your_id
SOCIALITE_GOOGLE_CLIENT_SECRET=your_secret
Configuration:
routes/web.php:
Route::get('/auth/facebook', [SocialiteController
How can I help you explore Laravel packages today?