-
Notifications
You must be signed in to change notification settings - Fork 175
Home
A simple client that provides SSO or opt-in authentication against a generic OAuth2 Server implementation.
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.
Get up and running with OpenID Connect in 5 minutes:
Install via WordPress.org plugin repository (search for "OpenID Connect Generic Client") or manually upload to /wp-content/plugins/.
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.
- Go to Settings > OpenID Connect Client in WordPress admin
- Enter your IDP information:
- Client ID
- Client Secret
- Scope (typically:
openid email profile) - Login Endpoint URL
- Userinfo Endpoint URL
- Token Validation Endpoint URL
- Choose Login Type:
- Button - Adds "Login with OpenID Connect" button to wp-login.php
- Auto Login (SSO) - Automatically redirects to IDP
- Log out of WordPress
- Visit your login page
- Click the OpenID Connect button (or get auto-redirected)
- Authenticate with your IDP
- You should be logged into WordPress
- Configure all settings - Explore 31+ configuration options
- Set up environment variables - Use constants for production
- Customize with hooks - Extend authentication behavior
- Troubleshoot issues - Common problems & solutions
You're a WordPress administrator setting up authentication.
Start here:
- Settings Reference - Understand all 31 plugin settings
- Environment Variables & Constants - Lock down settings for production
- Identity Provider Configuration - General IDP setup guidance
- Troubleshooting Common Issues - Fix authentication problems
Popular IDP guides:
You're a developer extending the plugin for custom requirements.
Start here:
- Hooks & Filters Reference - All 22 hooks with working examples
- Code Examples by Use Case - Copy-paste code recipes
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
- Go to "Plugins" in your WordPress dashboard.
- Click on "Add New".
- Search for the plugin using "OpenID Connect Generic Client".
- Click the "Install Now" button.
- "Activate" the plugin.
- Upload to the
/wp-content/plugins/directory - Activate the plugin
- Visit Settings > OpenID Connect Client and configure to meet your needs
OpenID Connect Generic on packagist
Installation:
composer require daggerhart/openid-connect-generic
- Home - Overview & Quick Start
- Settings & Configuration - Complete settings reference
- Identity Providers - IDP setup guidance
- Troubleshooting - Common issues & solutions
- Hooks Reference - All filters and actions
- FAQ - Frequently asked questions