Step By Step Tutorial On How To Use Auth0 in Laravel 9 for User Authentication

Mark Caggiano
3 min readMar 22, 2023

Step 1: Create a new Laravel project

Assuming you have Laravel installed, you can create a new project using the following command:

composer create-project --prefer-dist laravel/laravel my-project

Step 2: Install the Auth0 PHP SDK

You can install the Auth0 PHP SDK using composer. Run the following command in the terminal:

composer require auth0/auth0-php

Step 3: Create an account and application in Auth0

You will need an Auth0 account to use their authentication service. Once you have an account, you can create a new application by following these steps:

  • Login to your Auth0 dashboard
  • Click on the “Applications” tab
  • Click the “Create Application” button
  • Choose “Regular Web Applications”
  • Enter a name for your application
  • Click the “Create” button

Step 4: Configure Auth0

After creating an application, you need to configure it by setting the callback URL and allowed…

--

--