How OIDC verification works
SetMEETCOST_AUTH_MODE=oidc and provide MEETCOST_OIDC_ISSUER. MeetCost fetches the OIDC discovery document from <issuer>/.well-known/openid-configuration at startup and reads the JWKS endpoint from it. All token verification is local after that — no call to the IdP is made per-request.
MEETCOST_AUTH_MODE=dev accepts locally-signed tokens for local development. It is refused when MEETCOST_ENVIRONMENT=production. Never configure dev mode for a deployment that handles real pay data.Identity provider configuration
- Google Workspace
- Microsoft 365
- Okta
- Keycloak
email claim by default — no need to set MEETCOST_OIDC_EMAIL_CLAIM.The Meet add-on’s ScriptApp.getIdentityToken() produces a Google-signed JWT that MeetCost can verify directly, without any additional OAuth flow in the add-on.Non-standard email claims
MeetCost reads the user’s email from theemail JWT claim by default. If your identity provider uses a different claim name, set:
Admin console and SSO proxy integration
The admin console stores the caller’s token insessionStorage for the tab’s lifetime. The recommended production posture is to place MeetCost behind the SSO proxy you already operate:
oauth2-proxy
Configure oauth2-proxy to validate tokens and pass them upstream as
Authorization: Bearer <token> or X-Forwarded-Access-Token. MeetCost reads from Authorization by default.Pomerium
Pomerium can inject identity headers at the proxy layer. Configure the
pass_identity_headers policy to forward the JWT to MeetCost.Cloudflare Access
Cloudflare Access issues its own signed JWT in the
Cf-Access-Jwt-Assertion header. Configure MEETCOST_OIDC_ISSUER to your Access team domain and set MEETCOST_OIDC_AUDIENCE to your Access application AUD tag.Machine callers: service tokens
Cron jobs, webhook relays, and other automated systems that call the API use static service tokens rather than OIDC tokens. Configure them with:name:token pairs, comma-separated. The name is for your reference only (it appears in audit log entries). Callers pass the token as a standard bearer token:
Bootstrap admins
On first boot, before any role rows exist in the database, MeetCost needs at least one admin. UseMEETCOST_BOOTSTRAP_ADMINS to pre-grant the admin role to one or more email addresses:
admin role each time the service starts. Once you have a working admin user who can manage roles through the UI or CLI, this variable’s effect is idempotent — setting it to a real admin’s email is harmless to leave in place.
Development tokens
In development mode (MEETCOST_ENVIRONMENT=development, MEETCOST_AUTH_MODE=dev), the CLI can mint locally-signed tokens for any email address:
Role management
MeetCost has five roles:
Assign roles with the
meetcost grant CLI command:
--team-id flag is used with the team_lead role to scope access to a specific team. Without it, a team_lead has no team-scoped access.
You can also manage roles through the admin console UI once at least one admin is logged in.