Laravel Auth0 Integration Demo

This demo application shows how you can integrate Auth0 authentication into a simple Laravel application. It's based on this tutorial where we build a GOT character list with Laravel and Auth0.

Installation

Clone the repo

git clone https://github.com/auth0-blog/laravel-got

Switch into the newly created repo folder

cd laravel-got

Install the dependencies

composer install
npm install

Create the .env file

mv .env.example .env

Generate encryption key

php artisan key:generate

Sign up for Auth0 account

This application requires users to login. To do this, you need to sign up for a free Auth0 account.

There are three Auth0 values you'll need to fill in in your .env file. You can find the in the Auth0 dashboard.

AUTH0_DOMAIN=your-auth0-domain.auth0.com
AUTH0_CLIENT_ID=your-client-id
AUTH0_CLIENT_SECRET=your-client-secret

Run the application

php artisan serve