Skip to content

Commit

Permalink
v5.0 README updates (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Oct 28, 2022
1 parent bd5cacb commit 5bb7dec
Showing 1 changed file with 44 additions and 12 deletions.
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,66 @@ WordPress Plugin for [Auth0](https://auth0.com) Authentication

[![License](https://img.shields.io/packagist/l/auth0/auth0-php)](https://doge.mit-license.org/)

:books: [Documentation](#documentation) - :rocket: [Getting Started](#getting-started) - :speech_balloon: [Feedback](#feedback)

## Documentation

- [Download from WordPress.org](https://wordpress.org/plugins/auth0/)
- [Documentation](https://auth0.com/docs/cms/wordpress)
:rocket: [Getting Started](#getting-started) - :speech_balloon: [Feedback](#feedback)

## Getting Started

### Requirements

- PHP 8.0+
- Latest version of WordPress (6+)
- WP configured with databases priviledges to create tables

### Installation

1. Log in to an existing WordPress site as an administrator.
2. Go to Plugins → Add New in the admin menu on the left.
3. Search for "Login by Auth0"
#### Composer

Add the dependency to your application with [Composer](https://getcomposer.org/):

```
composer require auth0/wp-auth0
```

Then,

1. Log in to your WordPress site as an administrator.
2. Go to Plugins menu.
3. Look for "Login by Auth0" in the list.
4. Click Install Now, and then Activate.

#### WordPress.org

1. Log in to your WordPress site as an administrator.
2. Go to Plugins menu, then click 'Add New'.
3. Search for "Login by Auth0".
4. Click Install Now, and then Activate.

Addition information can be found in the [installation docs](https://auth0.com/docs/cms/wordpress/installation).
### Configure Auth0

Create a **Regular Web Application** in the [Auth0 Dashboard](https://manage.auth0.com/#/applications). Verify that the "Token Endpoint Authentication Method" is set to `POST`.

Next, configure the callback and logout URLs for your application under the "Application URIs" section of the "Settings" page:

- **Allowed Callback URLs**: The URL of your application where Auth0 will redirect to during authentication, e.g., `http://localhost:3000/callback`.
- **Allowed Logout URLs**: The URL of your application where Auth0 will redirect to after user logout, e.g., `http://localhost:3000/login`.

Note the **Domain**, **Client ID**, and **Client Secret**. These values will be used later.

### Configure the SDK

Please see the [configuration docs](https://auth0.com/docs/cms/wordpress/configuration) for instructions on how to configure Login by Auth0 for your site.
Upon activating the Auth0 WordPress plugin, you will find a new "Auth0" section on the left hand side of your administrative dashboard. This section enables you to configure the plugin.

At a minimum, you will need to configure the Domain, Client ID and Client Secret sections for the plugin to function.

We recommend testing on a staging/development site first using a separate Auth0 Application before putting the plugin live on your production site. Be sure to enable the plugin from the Auth0's plugins admin settings page for authentication with Auth0 to function.

### Plugin Database Tables

For performance reasons, V5 of the WordPress plugin as adopted it's own database tables. This means the WordPress database credentials [you have configured](https://wordpress.org/support/article/creating-database-for-wordpress/) must have appropriate priviledges to create new tables.

### Cron Configuration

We recommend testing on a staging/development site first using a separate Auth0 Application before putting the plugin live on your production site.
It's important to configure your WordPress site's built-in background task system, [WP-Cron](https://developer.wordpress.org/plugins/cron/). This is the mechanism that V5 of the WordPress plugin keeps WordPress and Auth0 in sync.

## Feedback

Expand Down

0 comments on commit 5bb7dec

Please sign in to comment.