triauth for MealieOIDC
Let your household open Mealie with one approval on their own device, and no Mealie passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- Mealie 2.0 and newer
- Set up in
- Environment variables
About Mealie
Mealie is a self-hosted recipe manager and meal planner. People save recipes from websites into one searchable collection, plan the week's meals, and turn the plan into a shopping list. A household or a group of friends runs one Mealie on a home server or NAS, and everyone signs in to it.
Connect Mealie to triauth
Mealie signs people in through the triauth OpenID Connect bridge. Once connected, the sign-in page shows Login with and your domain's name under the password form. People click it, type their username, and approve on their own device. Nobody keeps a Mealie password, and when someone leaves, removing their identity records at your domain ends their access to Mealie as well.
How it works
Open oidc.triauth.org and enter your domain. Paste Mealie's redirect address,
https://recipes.example.com/loginwith your own Mealie address in place ofrecipes.example.com, and click Connect app. The bridge gives you a client ID and a client secret.Add the settings below to Mealie's environment and restart it. Replace
example.comwith your domain,recipes.example.comwith your Mealie address, and the two placeholders with the client ID and the client secret from the bridge.iniOIDC_AUTH_ENABLED=true OIDC_CONFIGURATION_URL=https://oidc.triauth.org/example.com/.well-known/openid-configuration OIDC_CLIENT_ID=<client ID from the bridge> OIDC_CLIENT_SECRET=<client secret from the bridge> OIDC_PROVIDER_NAME=example.com BASE_URL=https://recipes.example.comOpen Mealie's sign-in page and click Login with example.com.
Checkpoint
Mealie's sign-in page shows Login with example.com under the password form. 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 Mealie account the first time they sign in, in the default group and household. People who already have a Mealie account under the same email address are moved over to the new sign-in. To let only one group in, limit the app to a group when you connect it, or name one of the groups at your domain in
OIDC_USER_GROUP. OIDC_ADMIN_GROUP=admins@example.commakes the members of that group Mealie administrators, and takes the role away again when they leave the group. Mealie's own groups and households are not touched.- Mealie has no phone app of its own. A third-party app that uses Mealie's sign-in for native apps needs a redirect address of a kind the bridge does not take, so people give such an app an API token from their profile page instead.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-mealie>/login, built from BASE_URL, which must be the https address people use. The documented /login?direct=1 is for providers with a sign-out endpoint and is not needed |
| Where in Mealie | the environment of the backend container, or Docker secrets for the client ID and the client secret |
| Discovery | OIDC_CONFIGURATION_URL takes the full discovery address, https://oidc.triauth.org/<your domain>/.well-known/openid-configuration |
| Scopes | openid email profile, and groups as soon as OIDC_USER_GROUP or OIDC_ADMIN_GROUP is set. Mealie reads the claims from the ID token |
| Claims | email is the account key, preferred_username the username, such as john, and name the full name. email_verified must be true, which the bridge sends |
| Sessions | Mealie issues its own token after the sign-in, usually good for two days, and the browser renews it without asking the bridge again. OIDC_REMEMBER_ME=true keeps it across browser restarts |
| Password sign-in | ALLOW_PASSWORD_LOGIN=false hides the password form once everyone uses the bridge |
Mealie keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Mealie's OpenID Connect guide explains the setup, and the backend configuration lists every variable.
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 household or organization an identifier at your domain.
- Read Groups to publish the group that Mealie makes administrators.
- Read Mealie's OpenID Connect guide for every setting Mealie 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.
