Skip to content

Commit

Permalink
docs: update with support for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Mar 11, 2024
1 parent c2e86cb commit 4ebff8c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 52 deletions.
54 changes: 27 additions & 27 deletions docs/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

When you're preparing to deploy your application to production, there are some basic steps you can take to make sure your application is running as smoothly and securely as possible. In this guide, we'll cover some starting points for making sure your application is deployed properly.

- [Auth0 Configuration](#auth0-configuration)
- [TLS / HTTPS](#tls--https)
- [Cookies](#cookies)
- [Server Configuration](#server-configuration)
- [Caddy](#caddy)
- [Nginx](#nginx)
- [Apache](#apache)
- [Optimization](#optimization)
- [Autoloader](#autoloader)
- [Dependencies](#dependencies)
- [Caching Configuration](#caching-configuration)
- [Caching Events](#caching-events)
- [Caching Routes](#caching-routes)
- [Caching Views](#caching-views)
- [Debug Mode](#debug-mode)
- [Auth0 Configuration](#auth0-configuration)
- [TLS / HTTPS](#tls--https)
- [Cookies](#cookies)
- [Server Configuration](#server-configuration)
- [Caddy](#caddy)
- [Nginx](#nginx)
- [Apache](#apache)
- [Optimization](#optimization)
- [Autoloader](#autoloader)
- [Dependencies](#dependencies)
- [Caching Configuration](#caching-configuration)
- [Caching Events](#caching-events)
- [Caching Routes](#caching-routes)
- [Caching Views](#caching-views)
- [Debug Mode](#debug-mode)

## Auth0 Configuration

When migrating your Laravel application from local development to production, you will need to update your Auth0 application's configuration to reflect the new URLs for your application. You can do this by logging into the [Auth0 Dashboard](https://manage.auth0.com/) and updating the following fields:

- **Allowed Callback URLs**: The URL that Auth0 will redirect to after the user authenticates. This should be set to the Internet-accessible URL of your application's `/callback` route.
- **Allowed Logout URLs**: The URL that Auth0 will redirect to after the user logs out. This should be set to an appropriate Internet-accessible URL of your application.
- **Allowed Callback URLs**: The URL that Auth0 will redirect to after the user authenticates. This should be set to the Internet-accessible URL of your application's `/callback` route.
- **Allowed Logout URLs**: The URL that Auth0 will redirect to after the user logs out. This should be set to an appropriate Internet-accessible URL of your application.

Note that you can include multiple URLs in these fields by separating them with commas, for example `https://example.com/callback,http://localhost:8000/callback`.

Expand Down Expand Up @@ -64,7 +64,7 @@ example.com {
X-Frame-Options "SAMEORIGIN"
}
php_fastcgi unix//var/run/php/php8.1-fpm.sock
php_fastcgi unix//var/run/php/php8.2-fpm.sock
}
```

Expand All @@ -76,32 +76,32 @@ server {
listen [::]:80;
server_name example.com;
root /var/www/example.com/public;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN";
large_client_header_buffers 4 32k;
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
Expand Down
49 changes: 24 additions & 25 deletions docs/Installation.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
# Installation

- [Prerequisites](#prerequisites)
- [Install the SDK](#install-the-sdk)
- [Using Quickstart (Recommended)](#using-quickstart-recommended)
- [Installation with Composer](#installation-with-composer)
- [Create a Laravel Application](#create-a-laravel-application)
- [Install the SDK](#install-the-sdk-1)
- [Install the CLI](#install-the-cli)
- [Authenticate the CLI](#authenticate-the-cli)
- [Configure the SDK](#configure-the-sdk)
- [Using JSON (Recommended)](#using-json-recommended)
- [Using Environment Variables](#using-environment-variables)
- [Prerequisites](#prerequisites)
- [Install the SDK](#install-the-sdk)
- [Using Quickstart (Recommended)](#using-quickstart-recommended)
- [Installation with Composer](#installation-with-composer)
- [Create a Laravel Application](#create-a-laravel-application)
- [Install the SDK](#install-the-sdk-1)
- [Install the CLI](#install-the-cli)
- [Authenticate the CLI](#authenticate-the-cli)
- [Configure the SDK](#configure-the-sdk)
- [Using JSON (Recommended)](#using-json-recommended)
- [Using Environment Variables](#using-environment-variables)

## Prerequisites

To integrate our SDK, your application must use a [supported Laravel version](https://laravelversions.com/en), and your environment must run a [supported PHP version](https://www.php.net/supported-versions.php). We do not support versions of either that are no longer supported by their maintainers. Please review [our support policy](./Support.md) for more information.
Your application must use the [latest supported Laravel version](https://endoflife.date/laravel), and your host environment must be running a [supported PHP version](https://www.php.net/supported-versions.php). Please review [our support policy](./docs/Support.md) for more information.

| SDK | Laravel | PHP | Supported Until |
| ---- | ------- | --- | --------------- |
| 7.5+ | 10 | 8.3 | Feb 2025 |
| | | 8.2 | Feb 2025 |
| | | 8.1 | Nov 2024 |
| 7.0+ | 9 | 8.2 | Feb 2024 |
| | | 8.1 | Feb 2024 |
| SDK | Laravel | PHP | Supported Until |
| ----- | ---------------------------------------------- | ---------------------------------------------- | --------------- |
| 7.13+ | [11.x](https://laravel.com/docs/11.x/releases) | [8.3](https://www.php.net/releases/8.3/en.php) | ~Sep 2025 |
| | | [8.2](https://www.php.net/releases/8.2/en.php) | ~Sep 2025 |

Due to breaking changes in Laravel 11, SDK 7.12 was the last version to support Laravel 9 and 10.

You will also need [Composer 2.0+](https://getcomposer.org/) and an [Auth0 account](https://auth0.com/signup).

Expand All @@ -32,7 +31,7 @@ Ensure that your development environment has [supported versions](#prerequisites

### Using Quickstart (Recommended)

- Create a new Laravel 9 project pre-configured with the SDK:
- Create a new Laravel 9 project pre-configured with the SDK:

```shell
composer create-project auth0-samples/laravel auth0-laravel-app
Expand All @@ -42,7 +41,7 @@ Ensure that your development environment has [supported versions](#prerequisites

#### Create a Laravel Application

- If you do not already have one, you can Create a new Laravel 9 application with the following command:
- If you do not already have one, you can Create a new Laravel 9 application with the following command:

```shell
composer create-project laravel/laravel:^9.0 auth0-laravel-app
Expand All @@ -66,20 +65,20 @@ Ensure that your development environment has [supported versions](#prerequisites

Install the [Auth0 CLI](https://github.com/auth0/auth0-cli) to create and manage Auth0 resources from the command line.

- macOS with [Homebrew](https://brew.sh/):
- macOS with [Homebrew](https://brew.sh/):

```shell
brew tap auth0/auth0-cli && brew install auth0
```

- Linux or macOS:
- Linux or macOS:

```shell
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .
sudo mv ./auth0 /usr/local/bin
```

- Windows with [Scoop](https://scoop.sh/):
- Windows with [Scoop](https://scoop.sh/):

```cmd
scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git
Expand All @@ -88,7 +87,7 @@ Install the [Auth0 CLI](https://github.com/auth0/auth0-cli) to create and manage

### Authenticate the CLI

- Authenticate the CLI with your Auth0 account. Choose "as a user," and follow the prompts.
- Authenticate the CLI with your Auth0 account. Choose "as a user," and follow the prompts.

```shell
auth0 login
Expand Down

0 comments on commit 4ebff8c

Please sign in to comment.