Skip to content

triauth for WordPressOIDC

Let your editors sign in to WordPress with one approval on their own device, through the OpenID Connect Generic Client plugin.

  • Websites and publishing
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every self-hosted WordPress, with the OpenID Connect Generic Client plugin
Set up in
Settings › OpenID Connect Generic

About WordPress

WordPress is the most widely used system for building and running websites and blogs. Teams use it to publish pages, news, and documentation, run shops and intranets, and let several editors work on the same site from a browser.

Connect WordPress to triauth

WordPress signs people in through the triauth OpenID Connect bridge, with the OpenID Connect Generic Client plugin. Once connected, the WordPress login page shows a Login with OpenID Connect button, whose text you can change. Your editors click it, type their username, and approve on their own device. Nobody keeps a WordPress password, and when someone leaves, removing their identity records at your domain ends their access to the site's dashboard as well.

How it works

  1. In WordPress, install and activate the plugin OpenID Connect Generic Client from the plugin directory.
  2. Open oidc.triauth.org and enter your domain. Paste the redirect address, https://www.example.com/openid-connect-authorize with your own site's address in place of www.example.com, and click Connect app. The bridge gives you a client ID and a client secret.
  3. In WordPress, open Settings › OpenID Connect Generic. Paste https://oidc.triauth.org/example.com/.well-known/openid-configuration, with your domain in place of example.com, into the Discovery URL box and click Load Configuration. Then paste the client ID and the client secret, set OpenID Scope to openid email profile offline_access, set Identity Key to sub, set Display Name Formatting to {name}, tick Enable Refresh Token and Alternate Redirect URI, and save. Finally open Settings › Permalinks and click Save Changes once.
  4. Open the login page and click Login with OpenID Connect.

Checkpoint

The WordPress login page shows a Login with OpenID Connect button. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • Everyone with an identity at your domain gets a WordPress account the first time they sign in, with the site's default role. To let only one team in, limit the app to a group when you connect it.
  • People who already have a WordPress account under the same email address are connected to it once you tick Link Existing Users.
  • Roles are managed in WordPress. The groups published at your domain are not used.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-site>/openid-connect-authorize with Alternate Redirect URI on, after saving the permalinks once. The plugin's default address carries a query string instead
Where in WordPressSettings › OpenID Connect Generic, or constants such as OIDC_CLIENT_ID in wp-config.php
DiscoveryLoad Configuration fills the login, token, userinfo, and JWKS endpoints and the Issuer. The issuer must read https://oidc.triauth.org/<your domain>, since the plugin otherwise guesses it from the host alone
Identity Keysub, so that accounts are linked by the identifier. The WordPress user name comes from preferred_username, the person's username, such as john
Refresh tokensEnable Refresh Token on, with offline_access in the scope. WordPress usually signs people out after two days anyway. Within that time, the plugin renews the sign-in through the bridge whenever its token expires, and logs the person out when a renewal fails, also one during a bridge outage. Leave the box unticked to keep the plain WordPress login

The plugin keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. The plugin page explains every setting.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.