Skip to content

triauth for PhotoPrismOIDC

Let your family or team open PhotoPrism with one approval on their own device, and no PhotoPrism passwords.

  • Photos and media
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every edition, including the free one
Set up in
Environment variables

About PhotoPrism

PhotoPrism is a photo and video library for a home server or NAS. It indexes the pictures, tags them with AI, builds albums and maps, and shares them with family or a small team through the browser. Sync apps reach it over WebDAV.

Connect PhotoPrism to triauth

PhotoPrism signs people in through the triauth OpenID Connect bridge. Once connected, the login page shows Continue with and your domain's name. People click it, type their username, and approve on their own device. Nobody keeps a PhotoPrism password, and when someone leaves, removing their identity records at your domain ends their access to PhotoPrism as well.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste PhotoPrism's redirect address, https://photos.example.com/api/v1/oidc/redirect with your own PhotoPrism address in place of photos.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  2. Add the settings below to PhotoPrism's environment and restart it. Replace example.com with your domain and the two placeholders with the client ID and the client secret from the bridge.

    ini
    PHOTOPRISM_OIDC_URI=https://oidc.triauth.org/example.com
    PHOTOPRISM_OIDC_CLIENT=<client ID from the bridge>
    PHOTOPRISM_OIDC_SECRET=<client secret from the bridge>
    PHOTOPRISM_OIDC_PROVIDER=example.com
    PHOTOPRISM_OIDC_SCOPES=openid email profile
    PHOTOPRISM_OIDC_USERNAME=email
    PHOTOPRISM_OIDC_REGISTER=true
    PHOTOPRISM_OIDC_WEBDAV=true
  3. Open PhotoPrism's login page and click Continue with example.com.

Checkpoint

PhotoPrism's login page shows Continue with example.com. 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

  • With registration on, everyone with an identity at your domain gets a PhotoPrism account the first time they sign in, as a guest who sees what is shared with them. An administrator raises their role afterwards. To let only one group in, limit the app to a group when you connect it.
  • The groups published at your domain are not used for roles.
  • Sync apps keep using WebDAV with an app password from each person's account page, which the last setting above allows for new accounts.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-photoprism>/api/v1/oidc/redirect, on the host named in PHOTOPRISM_SITE_URL
Where in PhotoPrismenvironment variables or command-line flags. HTTPS with valid certificates is required on both sides
IssuerPHOTOPRISM_OIDC_URI must equal the issuer in the discovery document exactly, with no trailing slash
ScopesPhotoPrism asks for address by default, which the bridge does not offer, so the scopes are set above
Sessionsa sign-in lasts 24 hours. Leave PHOTOPRISM_OIDC_LOGOUT unset, since the bridge has no sign-out endpoint

PhotoPrism keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. PhotoPrism's OpenID Connect guide explains every variable.

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.