Coder Social home page Coder Social logo

laravel-auth0's Introduction

Laravel Auth0 Plugin

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

  • Master targets Laravel 5.8 compatibility.
  • The 3.x branch (not maintained) targets Laravel 5.2 compatibility.
  • The 2.x branch (not maintained) targets Laravel 5.0 and 5.1 compatibility.
  • If you are working with an older version (Laravel 4.x), use version 1.0.* (not maintained)

CircleCI Latest Stable Version License Total Downloads

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.

Installation

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

$ composer require auth0/login:"~5.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

laravel-auth0's People

Contributors

glena avatar hrajchert avatar mgonto avatar joshcanhelp avatar lbalmaceda avatar seanmangar avatar cocojoe avatar ntotten avatar thijsvdanker avatar annyv2 avatar phillippohlandt avatar m1guelpf avatar devjack avatar irieznykov avatar dmyers avatar adamgoose avatar pose avatar anthonyvancauwenberghe avatar damieng avatar afreakk avatar jcombee avatar jfromaniello avatar mjmgooch avatar ryantology avatar carnevalle avatar vmartynets avatar iwader avatar ryannjohnson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.