• Stars
    star
    133
  • Rank 263,973 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 10 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress Plugin for Auth0 Authentication

WordPress by Auth0

WordPress Plugin for Auth0 Authentication

License

🚀 Getting Started - 💻 SDK Usage - 📆 Support Policy - 💬 Feedback

Getting Started

Requirements

Please review our support policy on specific PHP and WordPress versions and when they may exit support in the future.

Installation

Composer

The plugin supports installation through Composer, and is WPackagist compatible. This approach is preferred when using Bedrock or WordPress Core, but will work with virtually any WordPress installation.

When using Composer-based WordPress configurations like Bedrock, you'll usually run this command from the root WordPress installation directory. Still, it's advisable to check the documentation the project's maintainers provided for the best guidance. This command can be run from the wp-content/plugins sub-directory for standard WordPress installations.

composer require symfony/http-client nyholm/psr7 auth0/wordpress:^5.0

Note on Composer Dependencies

When installed with Composer, the plugin depends on the presence of PSR-18 and PSR-17 library implementations. The require command above includes two such libraries (symfony/http-client and nyholm/psr7) that satisfy these requirements, but you can use any other compatible libraries that you prefer. Visit Packagist for a list of PSR-18 and PSR-17 providers.

If you are using Bedrock or another Composer-based configuration, you can try installing auth0/wordpress without any other dependencies, as the implementations may be satisfied by other already installed packages.

Note PHP Standards Recommendations (PSRs) are standards for PHP libraries and applications that enable greater interoperability and choice. You can learn more about them and the PHP-FIG organization that maintains them here.

Activation

After installation, you must activate the plugin within your WordPress site:

  1. Open your WordPress Dashboard.
  2. Select 'Plugins' from the sidebar, and then 'Installed Plugins.'
  3. Choose 'Activate' underneath the plugin's name.

Configure Auth0

  1. Sign into Auth0. If you don't have an account, it's free to create one.
  2. Open 'Applications' from your Auth0 Dashboard, and select 'Create Application.'
  3. Choose 'Regular Web Application' and then 'Create.'
  4. From the newly created application's page, select the Settings tab.

Please prepare the following information:

  • Note the Domain, Client ID, and Client Secret, available from the newly created Application's Settings page. You will need these to configure the plugin in the next step.
  • From your WordPress Dashboard's General Settings page, note your WordPress Address and Site Address URLs. We recommend you read our guidance on common WordPress URL issues.

Continue configuring your Auth0 application from its Settings page:

  • Allowed Callback URLs should include the URL to your WordPress site's wp-login.php.
    • In most (but not all) cases, this will be your WordPress Address with /wp-login.php appended.
    • Please ensure your site is configured never to cache this URL, or you may see an "invalid state" error during login.
  • Allowed Web Origins should include both your WordPress Address and Site Address URLs.
  • Allowed Logout URLs should consist of your WordPress Address.

Common WordPress URL Issues
  • These must be the URLs your visitors will use to access your WordPress site. If you are using a reverse proxy, you may need to manually configure your WordPress Address and Site Address URLs to match the URL you use to access your site.
  • Make sure these URLs match your site's configured protocol. When using a reverse proxy, you may need to update these to reflect serving over SSL/HTTPS.

Troubleshooting

If you're encountering issues, start by checking that your Auth0 Application is setup like so:

  • Application Type must be set to Regular Web Application.
  • Token Endpoint Authentication Method must be set to Post.
  • Allowed Origins (CORS) should be blank.

Scroll down and expand the "Advanced Settings" panel, then:

  • Under OAuth:
    • Ensure that JsonWebToken Signature Algorithm is set to RS256.
    • Check that OIDC Conformant is enabled.
  • Under Grant Types:
    • Ensure that Implicit, Authorization Code, and Client Credentials are enabled.
    • You may also want to enable Refresh Token.

Configure the Plugin

Upon activating the Auth0 plugin, you will find a new "Auth0" section in the sidebar of your WordPress Dashboard. This section enables you to configure the plugin in a variety of ways.

For the plugin to operate, at a minimum, you will need to configure the Domain, Client ID, and Client Secret fields. These are available from the Auth0 Application you created in the previous step. Once configured, select the "Enable Authentication" option to have the plugin begin handling authentication for you.

We recommend testing on a staging/development site using a separate Auth0 Application before putting the plugin live on your production site.

Configure WordPress

Plugin Database Tables

The plugin uses dedicated database tables to guarantee high performance. When the plugin is activated, it will use the database credentials you have configured for WordPress to create these tables.

Please ensure your configured credentials have appropriate privileges to create new tables.

Cron Configuration

The plugin uses WordPress' background task manager to perform important periodic tasks. Proper synchronization between WordPress and Auth0 relies on this.

By default, WordPress' task manager runs on every page load, which is inadvisable for production sites. For best performance and reliability, please ensure you have configured WordPress to use a cron job to run these tasks periodically instead.

SDK Usage

The plugin is built on top of Auth0-PHP v8 — Auth0's full-featured PHP SDK for Authentication and Management APIs.

For custom WordPress development, please do not extend the plugin's classes themselves, as this is not supported. Nearly all of the plugin's APIs are considered internal and will change over time, most likely breaking any custom extension built upon them.

Instead, please take advantage of the full PHP SDK that the plugin is built upon. You can use the plugin's getSdk() method to retrieve a configured instance of the SDK, ready for use. This method can be called from the plugin's global wpAuth0() helper, which returns the WordPress plugin itself.

<?php

$plugin = wpAuth0(); // Returns an instanceof Auth0\WordPress\Plugin
   $sdk = wpAuth0()->getSdk(); // Returns an instanceof Auth0\SDK\Auth0

Please direct questions about developing with the Auth0-PHP SDK to the Auth0 Community, and issues or feature requests to it's respective repository. Documentations and examples on working with the Auth0-PHP SDKs are also available from it's repository.

Support Policy

  • Our PHP version support window mirrors the PHP release support schedule. Our support for PHP versions ends when they stop receiving security fixes.
  • As Automattic's stated policy is "security patches are backported when possible, but this is not guaranteed," we only support the latest release marked as "actively supported" by Automattic.
Plugin Version WordPress Version PHP Version Support Ends
5 6 8.2 Dec 2025
8.1 Nov 2024
8.0 Nov 2023
4 6.0, 6.1 8.0 Jun 2023
5 7.4, 8.0 Jun 2023

Composer and WordPress do not offer upgrades to incompatible versions. Therefore, we regularly deprecate support within the plugin for PHP or WordPress versions that have reached end-of-life. These deprecations are not considered breaking changes and will not result in a major version bump.

Sites running unsupported versions of PHP or WordPress will continue to function but will not receive updates until their environment is upgraded. For your security, please ensure your PHP runtime and WordPress remain up to date.

Feedback

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.


Auth0 Logo

Auth0 is an easy-to-implement, adaptable authentication and authorization platform.
To learn more checkout Why Auth0?

This project is licensed under the MIT license. See the LICENSE file for more info.

More Repositories

1

node-jsonwebtoken

JsonWebToken implementation for node.js http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html
JavaScript
17,054
star
2

java-jwt

Java implementation of JSON Web Token (JWT)
Java
5,403
star
3

express-jwt

connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes
TypeScript
4,396
star
4

jwt-decode

Decode JWT tokens; useful for browser applications.
JavaScript
2,913
star
5

angular2-jwt

Helper library for handling JWTs in Angular apps
TypeScript
2,606
star
6

nextjs-auth0

Next.js SDK for signing in with Auth0
TypeScript
1,903
star
7

angular-jwt

Library to help you work with JWTs on AngularJS
JavaScript
1,259
star
8

lock

Auth0's signin solution
JavaScript
1,121
star
9

go-jwt-middleware

A Middleware for Go Programming Language to check for JWTs on HTTP requests
Go
978
star
10

auth0.js

Auth0 headless browser sdk
JavaScript
949
star
11

auth0-spa-js

Auth0 authentication for Single Page Applications (SPA) with PKCE
TypeScript
873
star
12

auth0-react

Auth0 SDK for React Single Page Applications (SPA)
TypeScript
820
star
13

node-jwks-rsa

A library to retrieve RSA public keys from a JWKS (JSON Web Key Set) endpoint.
JavaScript
767
star
14

node-jws

JSON Web Signatures
JavaScript
698
star
15

angular-storage

A storage library for AngularJS done right
JavaScript
644
star
16

repo-supervisor

Scan your code for security misconfiguration, search for passwords and secrets. 🔍
JavaScript
632
star
17

node-auth0

Node.js client library for the Auth0 platform.
JavaScript
586
star
18

cosmos

🔭 Auth0 Design System
JavaScript
545
star
19

JWTDecode.swift

A JWT decoder for iOS, macOS, tvOS, and watchOS
Swift
545
star
20

nginx-jwt

Lua script for Nginx that performs reverse proxy auth using JWT's
JavaScript
534
star
21

SimpleKeychain

A simple Keychain wrapper for iOS, macOS, tvOS, and watchOS
Swift
488
star
22

auth0-python

Auth0 SDK for Python
Python
445
star
23

express-openid-connect

An Express.js middleware to protect OpenID Connect web applications.
JavaScript
434
star
24

react-native-auth0

React Native toolkit for Auth0 API
JavaScript
432
star
25

JWTDecode.Android

A library to help you decode JWTs for Android
Java
428
star
26

docs

Auth0 documentation
JavaScript
364
star
27

auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
PHP
355
star
28

wt-cli

Webtask CLI - all you need is code
JavaScript
322
star
29

auth0.net

.NET client for the Auth0 Authentication & Management APIs.
C#
296
star
30

passport-auth0

Auth0 authentication strategy for Passport.js
JavaScript
283
star
31

rules

Rules are code snippets written in JavaScript that are executed as part of the authentication pipeline in Auth0
JavaScript
283
star
32

react-native-lock

[DEPRECATED] A wrapper of Lock to use with React Native (iOS & Android)
Java
277
star
33

Auth0.swift

Auth0 SDK for Apple platforms
Swift
275
star
34

auth0-java

Java client library for the Auth0 platform
Java
265
star
35

Lock.swift

A Swift & iOS framework to authenticate using Auth0 and with a Native Look & Feel
Swift
251
star
36

auth0-cli

Build, manage and test your Auth0 integrations from the command line
Go
232
star
37

auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
JavaScript
231
star
38

laravel-auth0

Laravel SDK for Auth0 Authentication and Management APIs.
PHP
224
star
39

ruby-auth0

Ruby toolkit for Auth0 API
Ruby
189
star
40

cxn

cXn: extensible open-source CDN
Ruby
178
star
41

jwks-rsa-java

Java
178
star
42

passport-windowsauth

Windows Authentication strategy for Passport.js
JavaScript
175
star
43

Auth0.Android

Android toolkit for Auth0 API
Kotlin
171
star
44

auth0-angular

Auth0 SDK for Angular Single Page Applications
TypeScript
167
star
45

styleguide

🖌 Conjunction of design patterns, components and resources used across our products.
Stylus
160
star
46

terraform-provider-auth0

The Auth0 Terraform Provider is the official plugin for managing Auth0 tenant configuration through the Terraform tool.
Go
155
star
47

Lock.Android

Android Library to authenticate using Auth0 and with a Native Look & Feel
Java
140
star
48

jwt-handbook-samples

JWT Handbook code samples
JavaScript
139
star
49

node-samlp

SAML Protocol support for node (only IdP for now)
JavaScript
129
star
50

passport-linkedin-oauth2

Passport Strategy for LinkedIn OAuth 2.0
JavaScript
115
star
51

omniauth-auth0

OmniAuth strategy to login with Auth0
Ruby
112
star
52

symfony

Symfony SDK for Auth0 Authentication and Management APIs.
PHP
110
star
53

go-auth0

Go SDK for the Auth0 Management API.
Go
107
star
54

node-odata-parser

OData query string parser for node.js.
JavaScript
106
star
55

node-jwa

JSON Web Algorithms
JavaScript
98
star
56

auth0-vue

Auth0 authentication SDK for Vue.js apps
TypeScript
95
star
57

lock-passwordless

Auth0 Lock Passwordless [DEPRECATED]
JavaScript
93
star
58

express-jwt-authz

Validate the JWT scope to authorize access to an endpoint
JavaScript
93
star
59

auth0-angular2

84
star
60

auth0-aspnetcore-authentication

SDK for integrating Auth0 in ASPNET Core
C#
82
star
61

open-source-template

A template for open source projects at Auth0
81
star
62

auth0-authorization-extension

Auth0 Extension that adds authorization features to your account
JavaScript
81
star
63

react-browserify-spa-seed

Seed / Boilerplate project to create your own SPA using React, Browserify and ReworkCSS
JavaScript
80
star
64

node-baas

Node.js implementation of Bcrypt as a micro service.
JavaScript
79
star
65

password-sheriff

Password policies made easy.
JavaScript
77
star
66

sharelock-android

Sharelock Android app
Java
76
star
67

auth0-oidc-client-net

OIDC Client for .NET Desktop and Mobile applications
C#
75
star
68

node-oauth2-jwt-bearer

Monorepo for libraries that protect Node APIs with OAuth2 Bearer JWTs
TypeScript
75
star
69

idtoken-verifier

Lightweight RSA JWT verification
JavaScript
73
star
70

ad-ldap-connector

Auth0 AD and LDAP connector
JavaScript
70
star
71

nodejs-msi

Build an MSI Windows Installer for a node.js application using WIX Toolset.
PowerShell
70
star
72

auth0-spring-security-api

Spring Security integration with Auth0 to secure your API with JWTs
Java
70
star
73

id-generator

Generates random ids with a prefix (a la Stripe)
JavaScript
66
star
74

node-saml

SAML assertion creation for node
JavaScript
65
star
75

webtask-scripts

JavaScript
61
star
76

TouchIDAuth

A library for passwordless authentication using TouchID & JWT
Objective-C
60
star
77

passport-azure-ad-oauth2

OAuth 2.0 authentication Passport strategies for Windows Azure Active Directory
JavaScript
59
star
78

spa-pkce

JavaScript
58
star
79

discourse-plugin

Discourse plugin to authenticate with auth0.
Ruby
58
star
80

auth0-multitenant-spa-api-sample

JQuery SPA + Node.js API with multi-tenant support
JavaScript
58
star
81

sandboxjs

Sandbox node.js code like a boss
JavaScript
58
star
82

multitenant-jwt-auth

This sample shows how to implement an API that authenticates using JWTs. It supports mutiple tenants and JWT blacklisting.
JavaScript
54
star
83

coreos-mongodb

CoreOS MongoDB units
52
star
84

shiny-auth0

Auth0 shiny proxy
JavaScript
51
star
85

auth0-flutter

Auth0 SDK for Flutter
Dart
49
star
86

auth0-cordova

Auth0 integration for Cordova apps
JavaScript
49
star
87

sharelock-osx

Swift
47
star
88

disyuntor

A circuit-breaker implementation for node.js
TypeScript
47
star
89

passport-wsfed-saml2

passport strategy for both WS-fed and SAML2 protocol
JavaScript
47
star
90

php-jwt-example

Php JWT example.
PHP
46
star
91

auth0-aspnet-owin

Auth0 ASP.NET 4.5 Owin/Katana Authentication Handler
JavaScript
46
star
92

webauthn.me

webauthn.me, learn more about the Web Authentication API or try the debugger.
JavaScript
43
star
93

auth0-custom-password-reset-hosted-page

An example on how to do a custom reset password hosted page.
HTML
41
star
94

magic

Auth0 Cryptography Toolkit
JavaScript
40
star
95

auth0-java-mvc-common

Contains common helper classes and api client logic that are used across our Java MVC libraries
Java
39
star
96

single-page-app-seed

A very opinionated seed for creating Single Page Apps that uses NO framework at all. Just a bunch of component libs
JavaScript
39
star
97

auth0-dotnet-templates

Auth0 Templates for .NET
C#
38
star
98

webtask-workshop

37
star
99

kbd

Styles for <kbd> tags.
HTML
37
star
100

express-oauth2-bearer

Experimental Middleware for express.js to validate access tokens.
JavaScript
36
star