salt/auth0

Package which sets up Auth0 authentication for our Laravel applications

Fund package maintenance!
salt

0.0.9 2022-08-01 14:28 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package adds some helper classes for integrating Laravel applications with Auth0

Installation

You can install the package via composer:

composer require salt/auth0

You can publish and run the migrations with:

php artisan vendor:publish --tag="auth0-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="auth0-config"

This is the contents of the published config file:

return [
    'app' => array(
        'client_id' => env('AUTH0_CLIENT_ID', ''),
        'client_secret' => env('AUTH0_CLIENT_SECRET', ''),
        'db_connection' => env('AUTH0_DB_CONNECTION', '')
    ),
    'api' => array(
        'audience' => env('API_MACHINE_AUDIENCE', ''),
        'client_id' => env('AUTH0_MACHINE_CLIENT_ID', ''),
        'client_secret' => env('AUTH0_MACHINE_CLIENT_SECRET', ''),
        'domain' => env('AUTH0_MACHINE_DOMAIN')
    ),
    'url' => env('APP_URL', '')
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="auth0-views"

Documentation

View the documentation for this package here

Testing

composer test

Releasing a new version

To release a new version, first create a tag on the main branch with the new version number. E.g "1.0.1":

git tag -a 1.0.1 -m "Release version 1.0.1"

Then push that tag up to GitHub:

git push origin 1.0.1

A new version will automatically be created on packagist which will then be available for installation.

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