Skip to content

Sign-in and sender

notefeed is private by default

notefeed stores nothing about a person until you switch sign-in on: it is opt-in, switched on only by the NOTEFEED_OIDC_* variables (see Setup). Then it keeps the signed-in people in accounts.sqlite (see The sender), and nothing else.

With sign-in on, people log in through your own OpenID Connect provider (Authentik, Keycloak, Google and the like, one or several) instead of sharing the instance password, and the notes they post carry their name as a sender. Read links, RSS, feed passwords and scripts work as before. You want it when a team shares one instance and wants to see who posted what, or when each person should authorise MCP clients with their own account. A single person, or scripts, need nothing from it. A sign-in through a provider is an account: setting a provider means NOTEFEED_ACCOUNTS=provider unless you set another value, and it can't be combined with NOTEFEED_PASSWORD.

A sign-in, top to bottom. notefeed runs it with Better Auth, which keeps the person and the sign-in in a file of its own, accounts.sqlite (see The sender):

sequenceDiagram
  actor P as Person
  participant N as notefeed
  participant O as OIDC provider
  P->>N: Sign in with (provider)
  N-->>P: state cookie (state, nonce, PKCE), redirect
  P->>O: log in
  O-->>P: redirect to /api/auth/callback/<provider> with a code
  P->>N: the code
  N->>O: exchange it for the id_token
  N->>N: check its signature, the state, the nonce and NOTEFEED_OIDC_ALLOW
  N-->>P: session cookie, renewed while used: notes carry the sender

The sender

The sender is one field in the note's metadata (the .json file next to the note, or its database row): by default the first non-empty claim of NOTEFEED_OIDC_SENDER_CLAIM (the name, else the email). A note can also be posted with a sender of its own, from a script or the composer; the sender is a label, not a proof of who posted.

Sign-in keeps the person in accounts.sqlite (NOTEFEED_ACCOUNTS_DB, apart from the notes on every storage backend): their name from the provider (one line, at most 100 characters), their e-mail address (or a placeholder when the provider gives none), the provider's id for them, and their sessions. A session is renewed while it is used (at most once a day) and ends after 30 days unused, and 90 days after signing in whatever the use: then the person signs in again, usually one click at the provider (ADR 0056). A session keeps neither the browser's address nor its user agent, and none of the provider's tokens is kept. Each provider has its own people: the same e-mail address at two providers is two people, and the second one's sign-in is refused. Back the file up with the data (Backups).

The sender shows on the feed page, in the read-only view, in RSS as <dc:creator> and in the API as sender. A feed's Show who posted setting (show_sender in the settings API) hides it from readers; the feed page behind your password still shows it.

A copy can't be recalled

A note already fetched by an RSS reader keeps the sender it had. Turning the setting off hides it from now on, nothing more.

Scripts and passwords

Sign-in locks the instance to signed-in people, and there is no instance password beside it (Accounts). Scripts post to it with an account token.

MCP

An MCP client signs in as an account (MCP): its authorize page sends you to the login page, with a Sign in with button for each provider, and back. A client allowed that way posts with the person's sender, and stops working when the person is taken off the allow-list.

Removing a person

Take them off the allow-list and restart: they can no longer sign in, and their next request signs them out, in the browser and in MCP clients. Someone their provider removed while their address still fits the list (an @domain entry) keeps what they signed in with until it ends, at most 90 days after signing in: take them off the list too, or change NOTEFEED_SECRET. To sign everyone out at once, change NOTEFEED_SECRET. To remove what sign-in keeps about them, with notefeed stopped: sqlite3 accounts.sqlite "pragma foreign_keys = on; delete from user where email = 'ann@example.com'" (their sessions and provider id go with it; someone whose provider gave no address has a placeholder ending in .oidc.invalid, so use where name = 'Ann' then). Their notes keep the sender line until you delete the notes or edit it out of the files.

Privacy page and imprint

A sender name or e-mail address is personal data, and as the operator you are its controller. Before you switch sign-in on, make your privacy page say that notefeed keeps the signed-in person's name and e-mail address in its sign-in file, that notes carry their name or address, that it is shown on the public read link and in RSS unless the feed hides it, and how a person can have it removed.