WP Manifestindependent plugin directory
manifest / security / delegated-oauth2

Delegated Authentication WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Delegate OAuth 2 authorization to another WordPress site

★ 10stars
116kcomposer installs
1.0.6latest · 1 year ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/humanmade/delegated-oauth2/archive/refs/heads/master.zip

On Packagist as humanmade/delegated-oauth:

composer require humanmade/delegated-oauth
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Delegated Auth

Delegate authentication and user management to another WordPress site. Support native WordPress logins via the login form, and OAuth 2 REST API requests. The OAuth 2 REST API plugin must be enabled on the delegated upstream site.

When a login request is delegated to the upstream WordPress site a local cache of the user will be inserted into the WordPress database, mirroring all data, roles and capabilities. The login is synchronized on every request with the upstream WordPress site to make sure data is fresh and capabilities have not been removed. This can add some performance lag on all authenticated requests.

For Cookie auth to work correctly you must create an OAuth 2 application on the upstream WordPress site. Do so using the home_url( '/hm-delegated-auth-callback' ) as the Callback URL, and configure this plugin with the Client ID in the PHP constant HM_DELEGATED_AUTH_CLIENT_ID.

Note that if you are using multisite, this must use the home URL for the main site so that the callback URL is the same for the whole network. Delegated Auth then redirects internally between sites as necessary.

Caching Access Token Authentication

Checking the upstream WordPress site on each HTTP request to validate the OAuth 2 access token can cause significant load. Delegated Auth supports locally caching the access token validation for a short period of time, so not every request causes an upstream HTTP request. To enable this functionality, define the HM_DELEGATED_AUTH_ACCESS_TOKEN_CACHE_TTL constant with an integer value in seconds. For example, to cache Access Token validation for 60 seconds:

define( 'HM_DELEGATED_AUTH_ACCESS_TOKEN_CACHE_TTL', 60 );

Releases

6 releases.

Tag
Published
1.0.6 latest
Nov 19, 2024 1 year ago
Dec 1, 2020 5 years ago
Nov 25, 2020 5 years ago
Sep 15, 2020 6 years ago
Jan 29, 2020 6 years ago
May 29, 2019 7 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Delegated Authentication 1.0.0 · audited by WP Registry

No security issues found.

Audited release
1.0.0
Findings
none
Worst severity
—
Content hash
b527980173db717a713a7564…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.