Skip to content
daggerhart edited this page Feb 19, 2026 · 7 revisions

A simple client that provides SSO or opt-in authentication against a generic OAuth2 Server implementation.

Description

This plugin allows to authenticate users against OpenID Connect OAuth2 API with Authorization Code Flow. Once installed, it can be configured to automatically authenticate users (SSO), or provide a "Login with OpenID Connect" button on the login form. After consent has been obtained, an existing user is automatically logged into WordPress, while new users are created in WordPress database.

Quick Start

Get up and running with OpenID Connect in 5 minutes:

1. Install the Plugin

Install via WordPress.org plugin repository (search for "OpenID Connect Generic Client") or manually upload to /wp-content/plugins/.

2. Gather IDP Information

From your Identity Provider (Azure AD, Google, Keycloak, etc.), you'll need:

  • Client ID - Your application identifier
  • Client Secret - Your application secret key
  • Authorization Endpoint - Login URL
  • Token Endpoint - Token validation URL
  • Userinfo Endpoint - User information URL

Most IDPs provide these in their OpenID Connect discovery document at https://your-idp.com/.well-known/openid-configuration.

3. Configure Basic Settings

  1. Go to Settings > OpenID Connect Client in WordPress admin
  2. Enter your IDP information:
    • Client ID
    • Client Secret
    • Scope (typically: openid email profile)
    • Login Endpoint URL
    • Userinfo Endpoint URL
    • Token Validation Endpoint URL
  3. Choose Login Type:
    • Button - Adds "Login with OpenID Connect" button to wp-login.php
    • Auto Login (SSO) - Automatically redirects to IDP

4. Test Authentication

  1. Log out of WordPress
  2. Visit your login page
  3. Click the OpenID Connect button (or get auto-redirected)
  4. Authenticate with your IDP
  5. You should be logged into WordPress

Next Steps


I Want To...

🔧 Configure the Plugin (WordPress Admins)

You're a WordPress administrator setting up authentication.

Start here:

Popular IDP guides:

🎨 Customize & Extend (Site Developers)

You're a developer extending the plugin for custom requirements.

Start here:

Common customizations:

  • Control who can log in (domain restrictions, role-based access)
  • Sync user data with external systems (CRM, HR, analytics)
  • Custom role mapping from IDP claims
  • Enhanced logging and audit trails
  • Session management and security controls

Other resources:

  • Shortcodes - Display user information and login buttons
  • FAQ - Frequently asked questions

Installation

WordPress.org Plugin Repository

  1. Go to "Plugins" in your WordPress dashboard.
  2. Click on "Add New".
  3. Search for the plugin using "OpenID Connect Generic Client".
  4. Click the "Install Now" button.
  5. "Activate" the plugin.

Manual

  1. Upload to the /wp-content/plugins/ directory
  2. Activate the plugin
  3. Visit Settings > OpenID Connect Client and configure to meet your needs

Composer

OpenID Connect Generic on packagist

Installation:

composer require daggerhart/openid-connect-generic

I Want To...

🔧 Configure the Plugin

🎨 Customize & Extend


Documentation

Clone this wiki locally