tomshaw/google-api
Laravel Google OAuth 2.0 service client with configurable token storage (DB or custom), published config, and migrations. Integrates google/apiclient-services and supports Composer cleanup to include only the Google APIs you need (e.g., Gmail, Calendar).
Pros:
composer.json, reducing bundle size and improving performance.StorageAdapterInterface, enabling alignment with existing infrastructure.Calendar::getEvent()), improving developer experience and reducing cognitive load.consent, auto), aligning with Google’s security recommendations.Cons:
google/apiclient may introduce versioning risks or compatibility issues if Google’s API changes.Stack Compatibility:
Migration Path:
Key Integration Points:
auth_config in .env.composer.json and publish the config./auth/google, /auth/google/callback) and handle token persistence.High:
access_type (e.g., online instead of offline) may fail to persist tokens.google/apiclient updates may break functionality if not tested. Example: Google’s API deprecating an endpoint used by the package.Medium:
Low:
Security:
Scalability:
Compliance:
Maintenance:
google/apiclient integration)?Cost:
Laravel Ecosystem:
GoogleClient and service adapters (e.g., Calendar, Gmail), enabling clean architecture and testability..env and config publishing system, aligning with existing practices.TokenRefreshed, AuthFailed) for cross-cutting concerns like logging or analytics.PHP Extensions:
Database/Storage:
Preparation Phase:
.env with Google API credentials and publish the package config:
php artisan vendor:publish --provider="TomShaw\GoogleApi\Providers\GoogleApiServiceProvider" --tag=config
Pilot Integration:
// routes/web.php
Route::get('/auth/google', [GoogleAuthController::class, 'index']);
Route::get('/auth/google/callback', [GoogleAuthController::class, 'callback']);
Full Rollout:
composer.json with additional services (e.g., Gmail, Drive).GoogleServiceException).Optimization:
Google\Task\Composer::cleanup to exclude unused services.composer.json).google/apiclient directly.Phase 1: Authentication Setup (1–2 weeks):
Phase 2: Core Service Integration (2–3 weeks):
**Phase
How can I help you explore Laravel packages today?