devtvn / sociallumen
v1.1
2023-07-17 02:32 UTC
Requires
- php: >=8.0
- ext-rdkafka: ^6.0
- firebase/php-jwt: ^6.5
- guzzlehttp/guzzle: ^7.0.1
- illuminate/redis: ^10.15
- illuminate/support: ^10.15
- league/flysystem: ^1.0.8
- pusher/pusher-php-server: ^7.2
README
Social authentication multiple-platform and management users
feature
- Tiktok(maintenance)
- Github
- Bitbucket
- GitLab
- Microsoft
- Dropbox
- Pinterest(maintenance)
- Line
- shopify
Official Core SDKs
Required
- Php >= 8.x
- Lumen >= 8.x
- Composer >= 2.x
Install
composer require devtvn/sociallumen
Setup
- Add the config behind in the file bootstrap/app.php
$app->routeMiddleware([ "api"=> \Devtvn\Social\Http\Middleware\GlobalJwtMiddleware::class, ]); $app->register(Illuminate\Redis\RedisServiceProvider::class); $app->register(\Devtvn\Sociallumen\CoreServiceProvider::class); $app->configure('database'); $app->configure('social'); $app->withFacades(); $app->withEloquent();
- Add the config behind in the file config database.php
<?php 'connections' => [ ... 'database_core' => [ 'driver' => 'pgsql', 'url' => env('DATABASE_CORE_URL'), 'host' => env('DB_CORE_HOST', 'postgres'), 'port' => env('DB_CORE_PORT', '5432'), 'database' => env('DB_CORE_DATABASE', 'core'), 'username' => env('DB_CORE_USERNAME', 'default'), 'password' => env('DB_CORE_PASSWORD', 'secret'), 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, 'schema' => 'public', 'sslmode' => 'prefer', ], ... ]
- If you want customs model core then add config behind
use Devtvn\Social\Models\Core; class User extends Core { }
After setup config completed :
- Run command in terminal:
php artisan vendor:publish --tag=core-social && php artisan migrate
- Setup worker:
php artisan queue:work {onconnection in file social.php} --queue={onqueue in file social.php} --sleep=3 --tries=3 --timeout=9000
- Setup redirect_uri in app developer :
{host}/api/handle/auth