triauth for WordPressOIDC
Let your editors sign in to WordPress with one approval on their own device, through the OpenID Connect Generic Client plugin.
- 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
- In WordPress, install and activate the plugin OpenID Connect Generic Client from the plugin directory.
- Open oidc.triauth.org and enter your domain. Paste the redirect address,
https://www.example.com/openid-connect-authorizewith your own site's address in place ofwww.example.com, and click Connect app. The bridge gives you a client ID and a client secret. - In WordPress, open Settings › OpenID Connect Generic. Paste
https://oidc.triauth.org/example.com/.well-known/openid-configuration, with your domain in place ofexample.com, into the Discovery URL box and click Load Configuration. Then paste the client ID and the client secret, set OpenID Scope toopenid email profile offline_access, set Identity Key tosub, 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. - 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
| Setting | Value |
|---|---|
| Redirect address | https://<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 WordPress | Settings › OpenID Connect Generic, or constants such as OIDC_CLIENT_ID in wp-config.php |
| Discovery | Load 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 Key | sub, so that accounts are linked by the identifier. The WordPress user name comes from preferred_username, the person's username, such as john |
| Refresh tokens | Enable 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
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to limit the site to one team when you connect it.
- Read the OpenID Connect Generic Client plugin page for every setting it offers.
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.
