groundservices/oauth2-service

An OAuth2 micro service built on top of the laravel framework

v1.1.2 2020-10-19 21:59 UTC

This package is auto-updated.

Last update: 2022-11-22 00:17:52 UTC


README


Build Status quality gate status quality gate status quality gate status GitHub Packagist Version

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

Installation

  1. Install the OAuth2 project
composer create-project groundservices/OAuth2 <project-name>
  1. Run the composer install && composer update command to install and update dependancies
  2. Migrate the database
php artisan migrate
  1. 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
  1. 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.