Skip to content

triauth for AFFiNEOIDC

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

  • Notes and whiteboards
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Every self-hosted AFFiNE
Set up in
Admin Panel › Settings › OAuth

About AFFiNE

AFFiNE puts documents, whiteboards, and simple databases in one workspace, in the style of Notion and Miro. Teams use it to write docs, sketch diagrams, and plan work together, as a cloud service or on their own server.

Connect AFFiNE to triauth

AFFiNE signs people in through the triauth OpenID Connect bridge. Once connected, the sign-in page shows a Continue with OIDC button. People on your team click it, type their username, and approve on their own device. Nobody keeps an AFFiNE password, and when someone leaves, removing their identity records at your domain ends their access to AFFiNE as well.

This page is about an AFFiNE that you run yourself.

How it works

  1. Open oidc.triauth.org and enter your domain. Paste AFFiNE's redirect address, https://affine.example.com/oauth/callback with your own AFFiNE address in place of affine.example.com, and click Connect app. The bridge gives you a client ID and a client secret.
  2. In AFFiNE, open the Admin Panel, then Settings › OAuth, and turn on the OIDC provider. Paste the client ID and the client secret, and enter https://oidc.triauth.org/example.com, with your domain in place of example.com, as the issuer. Save.
  3. Open AFFiNE's sign-in page and click Continue with OIDC.

Checkpoint

AFFiNE's sign-in page shows a Continue with OIDC 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 an AFFiNE account the first time they sign in, as long as sign-up is allowed on your server, and people who already have an account under the same email address are connected to it. To let only one team in, limit the app to a group when you connect it.
  • Workspace seats and roles are managed in AFFiNE. The groups published at your domain are not used.
  • The desktop and mobile apps sign in through the same connection.

For the person who connects the app

SettingValue
Redirect addresshttps://<your-affine>/oauth/callback
Where in AFFiNEAdmin Panel › Settings › OAuth, provider OIDC
Issuerhttps://oidc.triauth.org/<your domain>, exactly, since AFFiNE compares it with the issuer named in the tokens
Claimsthe defaults sub, email, name, and email_verified all match what the bridge sends

AFFiNE keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. AFFiNE's OAuth guide explains the settings.

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.