progresivjose/laravel-piano-oauth

A laravel wrapper to progresivjose/piano-oauth package

v1.3.0 2023-07-20 16:43 UTC

This package is auto-updated.

Last update: 2024-09-20 19:19:54 UTC


README

This package is a laravel wrapper for the progresivjose/piano-oauth package

Requirements

  • PHP ^8.1
  • Laravel ^10

Instalation

First you need to install the package in your laravel project

composer require progresivjose/laravel-piano-oauth -W

Then you'll need to include the provider in the config/app.php file

'providers' => ServiceProvider::defaultProviders()->merge([
    /*
    * Application Service Providers...
    */

    Progresivjose\LaravelPianoOauth\Providers\PianoOauthProvider::class,
])->toArray(),

After that you can run the vendor:publish to import the assets and config files.

php artisan vendor:publish

Then you must run the migration command to create the piano_users table

php artisan migrate

After that you must change the config/auth.php file and replace the App\User.php value from the providers config to \Progresivjose\LaravelPianoOauth\Models\PianoUser::class

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => \Progresivjose\LaravelPianoOauth\Models\PianoUser::class,
    ],
]

And that's all you must do to use the Piano Oauth in your laravel project

Enviroment Values

The package expects the following values in your .env file

  • PIANO_AID
  • PIANO_API_TOKEN
  • PIANO_OAUTH_CLIENT_SECRET
  • PIANO_AUTH_GUARD
  • PIANO_API_URL

Configuration

The package creates a confi/piano.php files, which stores all the confirgurations needed for the package, but the redirect_url value is set for sandbox and testing puposes, for production you must use https://id.tinypass.com/id