Third-party integrationsWordPress and WooCommerce

Site-wide age verification

Configure a wallet disclosure that grants temporary access to WordPress pages and REST content.

Site-wide age verification uses a separate disclosure plugin. It requests an over-18 attribute through a wallet disclosure and grants temporary browser access after a verified positive result. It creates no WordPress account and does not require a birthdate.

This gate covers public pages rendered by WordPress and REST responses. It does not provide product-specific WooCommerce checkout restrictions. Page caches, CDNs, static files and direct media URLs need the separate access rules described below.

How it works

WordPress creates a confidential disclosure intent with a fresh challenge and PKCE. It validates the signed result against the configured flow, organization, trusted signing issuer, audience and challenge. Only boolean true at mapping.ageOver18.value grants access. The browser permission lasts at most five minutes and expires sooner if the signed result does.

Install the disclosure plugin

Install WordPress age-disclosure plugin 0.1.1 (ZIP) through Plugins → Add New → Upload Plugin, then activate it. This package is needed for the age gate; standard OIDC login does not provide that feature. It bundles firebase/php-jwt 7.2.1. Use PHP 8.3 with OpenSSL and Sodium, HTTPS and working WordPress permalinks.

Choose the site-wide disclosure route or the standard OIDC login route for this setup; do not enable both wallet buttons.

Before you begin

Use a separate Studio disclosure and its own credentials. The WordPress login callback and authentication flow are not interchangeable with this disclosure. Keep the site's independent password-based administrator login available.

This example uses Yivi. The wallet must hold the trusted pbdf.gemeente.personalData.over18 attribute. Configure the exact attribute and mapping below; the display label Yes / No is not a positive value.

Configure Ver.iD

  1. Create a disclosure dedicated to this age check. Select Yivi and only pbdf.gemeente.personalData.over18 from the intended trusted issuer.
  2. Create a mapping whose input key and output claim are both ageOver18.
  3. Use this function for the verified attribute input:
(attributeData) => attributeData.ageOver18 === 'Yes';

The function accepts the exact raw value Yes and returns boolean false for every other input. Do not use a truthiness check, join the attributes into a string or return the strings "true" and "false".

  1. Attach that mapping to the disclosure. Add an active brand and an OAUTH secret.

Register the age callback

Open Settings → Wallet connection and copy Age callback:

<wordpress-base-url>/verid-wallet/age-callback

In Ver.iD Studio → Verify → Disclosures → your flow → Redirect URIs, add that exact HTTPS URL, then activate the flow. Retain the authentication callback on its separate flow if you use it on another site.

Configure age mode

Under Age disclosure, enter:

SettingValue
Age issuerhttps://ssi.oauth.ver.id/
Disclosure client IDThe dedicated disclosure flow's client identifier
Disclosure client secretIts attached OAUTH secret's Key (as base64url) value
Trusted disclosure token issuerThe signing issuer supplied by your Ver.iD deployment administrator
Organization UUIDThe Studio organization that owns the disclosure

The trusted token issuer may be a URN and is different from the HTTPS discovery issuer. Obtain it from trusted configuration; do not copy it from an unverified token.

Set Mode → Site-wide age verification and select Save configuration. The login settings remain stored separately, but the wallet-login button is inactive in age mode.

Complete the age journey

  1. Open a public page in a new private window. It should show the age gate with Verify I am 18 or over.
  2. Select the button, scan the request with Yivi and approve the over-18 attribute.
  3. Continue in the original browser. A positive signed result should return you to the requested page.
  4. Open another page and a REST content URL in that browser. Both should follow the same permission policy.
  5. Wait until the permission expires, then request the URLs again. Access must be blocked until a new successful disclosure.

Cancellation, a negative or missing result and an expired request must not grant access. Test those branches separately. Use [verid_age_verification] to show the button in content rendered by WordPress.

Check caches and direct routes

Bypass page and CDN caching for protected responses so every request reaches the server-side gate. A cache can otherwise return content before WordPress executes.

Request protected HTML and REST URLs directly from a fresh browser with no age permission, and again after expiry. They must remain blocked. A copied URL or manually entered browser value must not grant permission.

Configure your web server or content delivery layer separately if media or static files must also require age verification. Normal administration, password login and the connector's callbacks stay reachable by design; administrator access follows WordPress's own authentication policy.

On this page