Skip to content

Single sign-on

If your household or organization already has a sign-in service, people can use it for Savorum instead of a separate password. Savorum supports OpenID Connect (OIDC), LDAP and Active Directory, a trusted reverse proxy, and SAML 2.0. Each person still gets a full Savorum account that owns their libraries and recipes.

  1. List your providers in a JSON file, using the examples below. Keep passwords, client secrets, and keys in separate files that it refers to, readable only by the Savorum service account.

  2. Point Savorum at the file, with --auth-providers-file or SAVORUM_AUTH_PROVIDERS_FILE:

    Load the provider file
    savorum serve --database /var/lib/savorum/savorum.db \
    --auth-enabled --public-url https://recipes.example.com \
    --auth-providers-file /etc/savorum/providers.json
  3. Restart Savorum whenever you change the file.

Every provider has an ID, such as company-oidc. Choose it once and keep it. Use a new ID when the sign-in service itself changes, and never reuse an old ID for a different organization. local, passkey, recovery, token, and system are reserved.

Every provider also accepts:

  • auto_provision: creates an account the first time someone new signs in. Off by default. Accounts are never merged because their emails match.
  • default_library and default_role (viewer or editor): give new accounts a starting membership.
  • allow_local_recovery: true: lets people who sign in only through this provider create recovery codes. Off by default.

Without automatic accounts, a person needs an invitation, or must link the provider to their existing account under Your account → Sign-in and security.

providers.json
{
"providers": [
{
"id": "company-oidc",
"kind": "oidc",
"display_name": "Company account",
"auto_provision": true,
"default_library": "YOUR_LIBRARY_ID",
"default_role": "viewer",
"oidc": {
"issuer": "https://identity.example.com/realms/company",
"client_id": "savorum",
"client_secret_file": "/run/secrets/savorum-oidc-client",
"groups_claim_path": "organization.groups"
}
}
]
}

Register this exact redirect URI with the provider:

https://recipes.example.com/api/v1/auth/company-oidc/callback

For Connect, also register this callback path at your assigned Connect address. Keep the local redirect URI if you use SSO locally.

Savorum asks for openid profile email, plus anything you list in scopes. Set groups_claim_path, a dot-separated path, only if the provider puts a trustworthy list of groups in its ID token. A missing claim means no groups. A malformed claim fails sign-in.

OIDC, LDAP, and SAML providers can pass a person’s groups to Savorum. To turn a group into a library role:

  1. Open Instance administration → Sign-in providers.
  2. Choose the provider and enter the group exactly as the provider sends it.
  3. Choose a library and a role.

Each rule grants one membership. The same group name from a different provider grants nothing. When a group disappears, only that rule’s membership goes. Manual memberships and other rules stay, and the highest role applies.

Sign in through the provider with an account that isn’t an administrator, and check that it gets only the library memberships you intended.

  • Removing or disabling a provider takes effect at the next restart. It ends that provider’s browser sessions and removes the memberships it granted. Accounts, manually granted memberships, and other sign-in methods stay.
  • Tokens created while signed in through a provider stop working when that provider is disabled.