All Projects → auth0 → Laravel Auth0

auth0 / Laravel Auth0

Licence: mit
Laravel plugin for Auth0

Labels

Projects that are alternatives of or similar to Laravel Auth0

Employee Mgmt Laravel5.4 Adminlte
The project is using laravel 5.4 and adminlte
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Lqycms
基于laravel框架的企业级开源cms管理系统,开源php商城源码,B2C微商城系统,企业建站cms。
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Laravel Paket
Composer GUI. Manage Laravel dependencies from web interface without switching to command line!
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Laravel Scaffold
The base for developing awesome projects
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Validation
🔒 Laravel farsi/persian validation
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Psalm Plugin Laravel
A Psalm plugin for Laravel
Stars: ✭ 139 (-2.8%)
Mutual labels:  laravel
Laravel Mailable Test
An artisan command to easily test mailables
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Laravel Passport Social Grant
🔒 API authentication via social networks for your Laravel application
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Bkash
PHP client for bKash Payment Gateway API
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Ladmin
EasyLms is a development management system with Laravel
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Gh Actions Yaml Generator
Ghygen is a GitHub Actions configurator for your Laravel Application.
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Localization
🌐 Localization package for Laravel
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel
Server Monitor App
A PHP application to monitor the health of your servers
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Laravel Awesome
Laravel 学习图谱
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Artisan Menu
📝 Artisan Menu - Use Artisan via an elegant console GUI
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Twilio
Twilio notifications channel for Laravel
Stars: ✭ 141 (-1.4%)
Mutual labels:  laravel
Youtube
Upload a video to a single YouTube channel with Laravel 5.
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Laravel Postmark
A Postmark adapter for Laravel
Stars: ✭ 143 (+0%)
Mutual labels:  laravel
Neontsunami Laravel
Source for my website and blog
Stars: ✭ 142 (-0.7%)
Mutual labels:  laravel

Laravel Auth0 Plugin

CircleCI Latest Stable Version License Total Downloads FOSSA Status

This plugin helps you integrate your Laravel WebApp with Auth0 to achieve Single Sign On with a few simple steps.

Supported Framework Versions

Our plugin maintains support for all actively supported versions of the Laravel framework, including 6.X (LTS), 7.X and 8.X.

Past releases of our plugin may potentially run on earlier, now unsupported versions of the Laravel framework, but these releases are not maintained. The final release of our plugin to support the Laravel 5.X series was 6.1.0.

Documentation

Please see the Laravel webapp quickstart for a complete guide on how to install this in an existing project or to download a pre-configured sample project. Additional documentation on specific scenarios is below.

Setting up a JWKs cache

In the register method of your AppServiceProvider add:

// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Cache;
// ...
    public function register()
    {
        // ...
        $this->app->bind(
            '\Auth0\SDK\Helpers\Cache\CacheHandler',
            function() {
                static $cacheWrapper = null;
                if ($cacheWrapper === null) {
                $cache = Cache::store();
                $cacheWrapper = new LaravelCacheWrapper($cache);
            }
            return $cacheWrapper;
        });
    }

You can implement your own cache strategy by creating a new class that implements the Auth0\SDK\Helpers\Cache\CacheHandler contract, or just use the cache strategy you want by picking that store with Cache::store('your_store_name');

Storing users in your database

You can customize the way you handle the users in your application by creating your own UserRepository. This class should implement the Auth0\Login\Contract\Auth0UserRepository contract. Please see the Custom User Handling section of the Laravel Quickstart for the latest example.

Using auth guard

To protect APIs using an access token generated by Auth0, there is an auth0 API guard provided (Laravel documentation on guards). To use this guard, add it to config/auth.php with the driver auth0:

'guards' => [
    ...
    'auth0' => [
        'driver' => 'auth0',
        'provider' => 'auth0',
    ],
],

'providers' => [
    ...
    'auth0' => [
        'driver' => 'auth0',
    ],
],

Once that has been added, add the guard to the middleware of any API route and check authentication during the request:

// get user
auth('auth0')->user();
// check if logged in
auth('auth0')->check();
// protect routes via middleware use
Route::group(['middleware' => 'auth:auth0'], function () {});

Installation

Install this plugin into a new or existing project using Composer:

$ composer require auth0/login:"~6.0"

Additional steps to install can be found in the quickstart.

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Support + Feedback

Include information on how to get support. Consider adding:

  • Use Community for usage, questions, specific cases
  • Use Issues for code-level support

What is Auth0?

Auth0 helps you to easily:

  • implement authentication with multiple identity providers, including social (e.g., Google, Facebook, Microsoft, LinkedIn, GitHub, Twitter, etc), or enterprise (e.g., Windows Azure AD, Google Apps, Active Directory, ADFS, SAML, etc.)
  • log in users with username/password databases, passwordless, or multi-factor authentication
  • link multiple user accounts together
  • generate signed JSON Web Tokens to authorize your API calls and flow the user identity securely
  • access demographics and analytics detailing how, when, and where users are logging in
  • enrich user profiles from other data sources using customizable JavaScript rules

Why Auth0?

License

The Auth0 Laravel Login plugin is licensed under MIT - LICENSE

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].