Repository navigation
OpenID Connect
This page documents the protocol behavior and deployment requirements of the Scouting OpenID Connect integration.
The plugin uses the Scouting Nederland issuer:
https://login.scouting.nl
It retrieves the provider discovery document from the issuer's
.well-known/openid-configuration endpoint and uses the discovered authorization,
token, UserInfo, signing-key, and logout endpoints.
The login flow is Authorization Code Flow with PKCE using the S256 challenge
method. The provider must advertise S256 support. Each authorization request
includes a random state value, nonce, PKCE verifier, and PKCE challenge.
The plugin uses the WordPress home URL with a trailing slash as its redirect URI. Register the exact same public URL in the managed website connection:
https://example.org/
Register the post-logout redirect URI there too. Differences in scheme, host, path, port, or trailing slash can cause the provider to reject the login or logout request.
The plugin supports these scopes:
| Scope | Claims and behavior |
|---|---|
openid |
Enables OpenID Connect authentication. |
membership |
Provides the SOL member ID used as the local username. |
profile |
Provides name, locale, profile URL, birthdate, and gender information. |
email |
Provides the email address for the WordPress account. |
address |
Provides optional address data. |
phone |
Provides optional phone data. |
roles |
Provides organizations, units, role definitions, and dated user assignments for local authorization. |
openid, membership, profile, and email are required for the normal login
and account lifecycle. address and phone are needed only when their matching
profile storage options are enabled.
The optional roles scope powers SOL role mapping and
WooCommerce SOL Access. Role data is synchronized from
validated UserInfo during OIDC login. Removing the scope does not clear
previously stored assignments, but immediately makes them unavailable for
authorization. Complete a fresh successful OIDC login after restoring the scope
to make synchronized assignments available again.
Before a user is signed in, the plugin:
- Requires an ID token with exactly three JWT segments and an
RS256algorithm. - Finds the signing certificate for the token
kidin the provider JWKS and verifies the signature. - Verifies the issuer, audience, expiry, issued-at time, subject, and nonce.
- Calls the discovered UserInfo endpoint using the access token.
- Requires the UserInfo
subto match the validated ID token subject. - Clears one-time authorization values and rotates the OIDC session identifier after successful login.
The discovery document and JWKS are cached for one hour. See Architecture for a broader view of the flow.
On WordPress logout, the plugin attempts to send the browser to the provider's
discovered end-session endpoint. It includes the stored ID token as an
id_token_hint when available. When no usable provider logout URL or ID token
is available, it falls back to the WordPress home URL.
SOL login creates a persistent WordPress login, equivalent to Remember Me.
WordPress defaults to 14 days; other plugins or the auth_cookie_expiration
filter can change this. Closing the browser does not normally end that login.
The plugin's separate one-hour OIDC cookie and transients hold login-flow data;
they do not set the WordPress login lifetime.
Returning with a valid WordPress cookie does not fetch fresh UserInfo or recheck provider-side access. Profile and SOL role synchronization happen during the OIDC login flow, not on every visit or on a background schedule.
OIDC login requires the browser-facing site to use HTTPS. The plugin sets a secure, host-only cookie for OIDC request state, so a plain HTTP request cannot start an OIDC login.
The plugin uses WordPress' is_ssl() result. Configure the reverse proxy,
hosting platform, or container image so WordPress recognizes the browser-facing
HTTPS connection before it loads. This makes WordPress create secure core cookies
and generate HTTPS URLs as well as allowing the plugin to create its OIDC cookie.
For example, the official Docker WordPress images already set HTTPS when the
runtime receives X-Forwarded-Proto: https. No plugin-specific proxy IP or
hostname setting is required in that setup.
For another deployment platform, use its supported reverse-proxy integration or
the WordPress reverse-proxy guidance.
Verify the result through WordPress Site Health and by confirming that is_ssl()
is true for an externally HTTPS request.
Never trust X-Forwarded-Proto from arbitrary clients. The trusted proxy must:
- Remove any client-supplied forwarding headers before forwarding the request.
- Set
X-Forwarded-Protoitself according to the browser-facing connection. - Be the only component allowed to connect directly to the WordPress or PHP service.
This boundary belongs in the proxy and WordPress runtime configuration, not in the plugin. The plugin relies on WordPress' resulting HTTPS decision.
If no secure path is recognized, the local Scouting login option may still be visible, but activating it fails safely before redirecting to the provider. The normal WordPress username/password form remains available as an administrator recovery path.
- Home
- Introduction
- Installation
- Configuration
- Shortcodes
- OpenID Connect
- Operations and Troubleshooting
- Users, Privacy and Data Lifecycle
- Account Management and Authorization
- SOL Roles and Mapping
- WooCommerce SOL Access
- Migration, Backup and Recovery
- Developer Integration
- FAQ and Known Limitations
- Architecture