marshmallow / authenticator
A package to simply authenticate with differt platforms like Instagram, Zoho Desk, Facebook etc.
Fund package maintenance!
marshmallow
Requires
- php: ^8.0
- illuminate/contracts: ^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.4.3
Requires (Dev)
- brianium/paratest: ^6.2
- nunomaduro/collision: ^5.3|^6.0
- orchestra/testbench: ^6.15|^7.0|^8.0
- phpunit/phpunit: ^9.3
- spatie/laravel-ray: ^1.9
- vimeo/psalm: ^4.4
README
This package makes it super easy to authenticate with different api's. As of this moment we only support Instagram auth but we will add more as soon as we need them, and that should be soon. Just run Authenticator::instagramToken()->refresh()->getAccessToken()
and you have your token available.
Installation
You can install the package via composer:
composer require marshmallow/authenticator
You can publish and run the migrations with:
php artisan vendor:publish --provider="Marshmallow\Authenticator\AuthenticatorServiceProvider" --tag="authenticator-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Marshmallow\Authenticator\AuthenticatorServiceProvider" --tag="authenticator-config"
This is the contents of the published config file:
return [ 'instagram' => [ 'client_id' => env('AUTH_INSTAGRAM_CLIENT_ID', null), 'client_secret' => env('AUTH_INSTAGRAM_CLIENT_SECRET', null), 'redirect_uri' => env('AUTH_INSTAGRAM_REDIRECT_URI', null), ], ];
Usage
You can run the command below to start the authentication process with Instagram. Follow the steps in your command line and this package will do the magic for you.
php artisan auth:instagram
Once you've run the command above, you can get the access token from Instagram as shown below.
use Marshmallow\Authenticator\Facades\Authenticator; Authenticator::instagramToken()->refresh()->getAccessToken();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.