groundservices / oauth2-service
An OAuth2 micro service built on top of the laravel framework
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.2.5
- fideloper/proxy: ^4.2
- fruitcake/laravel-cors: ^2.0
- guzzlehttp/guzzle: ^6.3
- laravel/framework: ^7.24
- laravel/passport: ^9.3.2
- laravel/socialite: ^5.0
- laravel/tinker: ^2.0
- laravel/ui: ^2.4
Requires (Dev)
- facade/ignition: ^2.0
- fzaninotto/faker: ^1.9.1
- mockery/mockery: ^1.3.1
- nunomaduro/collision: ^4.1
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-04-22 03:56:08 UTC
README
Introduction
The groundservices OAuth2 is a highly capable and customizable authentication micresoervice built on top of the laravel framework. We believe that development of micro services can be enjoyable and definitely shouldn't be time consuming. Groundservices OAuth2 service takes the pain out of authentication developoment by scaffolding basic components of an authentication service, while leaving room for customization with extra features.
Setup guide
Requirements
- Composer
- PHP 7.x.x
Installation
- Install the OAuth2 project
composer create-project groundservices/OAuth2 <project-name>
- Run the
composer install && composer update
command to install and update dependancies - Migrate the database
php artisan migrate
- Create the encryption keys needed to generate secure access tokens. In addition, the command will create "personal access" and "password grant" clients which will be used to generate access tokens:
php artisan passport:install
-Optional: If you prefer to use UUIDs instead of auto increment values.
php artisan passport:install --uuids
- Add the personal access client ID and secret values to your .env file (You can find them in the terminal after running the command in STEP 4. You can also find them in your database)
PASSPORT_PERSONAL_ACCESS_CLIENT_ID=client-id-value
PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET=unhashed-client-secret-value
Usage
The OAuth2 service is used by making API calls to the service from a seaparate front end which may either reside on the same domain or an entirely fifferent domain. Below are the available endpoints to intereact to with the OAuth2 service. Note that it is strongly recommended to channel the requests through an API gateway rather than directly from the front end app.
- register:
/api/register
- login:
/api/login
- logout:
/api/logout
- login with github
/api/login/github
Security Vulnerabilities
If you discover a security vulnerability within Groundservices, please send an e-mail to Taylor Otwell via mcjohnsonlyndon@gmail.com. All security vulnerabilities will be promptly addressed.
License
The OAuth2 service is open-sourced software licensed under the MIT license.