devtvn / social
This package is abandoned and no longer maintained.
No replacement package was suggested.
This is a package management users.
v2.6
2023-07-21 07:57 UTC
Requires
- php: >=7.4
- firebase/php-jwt: ^6.5
- illuminate/support: >=5.8
- predis/predis: ^2.1
- pusher/pusher-php-server: ^7.2
This package is auto-updated.
Last update: 2023-10-02 10:37:15 UTC
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 >= 7.4
- Laravel >= 8.x
- Composer >= 2.x
Install
composer require devtvn/social
Setup
- Add the config behind in the file kernel.php
protected $middlewareGroups = [ ... 'api' => [ ... \Devtvn\Social\Http\Middleware\GlobalJwtMiddleware::class ], ];
- 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
API
Method | URI | Action | Middleware |
---|---|---|---|
POST | api/{platform}/generate-url | CoreController@generateUrl | global |
GET | api/handle/auth | CoreController@handleAuth | social.auth,core.shopify,global |
POST | api/app/login | AppController@login | global |
POST | api/app/register | CoreController@register | global |
POST | api/app/refresh | CoreController@refresh | refresh |
DELETE | api/app/delete | CoreController@delete | core ,global |
GET | api/app/info | CoreController@user | core ,global |
POST | api/app/info | CoreController@updateUser | core ,global |
PUT | api/app/change-password | CoreController@changePassword | core ,global |
POST | api/app/forgot-password | CoreController@reset | global |
POST | api/app/re-send | CoreController@reSendLinkEmail | global |