actualbudget/actual · error

OpenID configuration not found

Error message

OpenID configuration not found

What it means

After password validation, POST /openid/config reads the stored OpenID configuration via UserService.getOpenIDConfig(). If nothing is stored, the endpoint responds 500 with reason 'OpenID configuration not found'. This means the server's internal state lacks the OpenID config record expected at bootstrap time.

Source

Thrown at packages/sync-server/src/app-openid.ts:84

app.post('/config', openIdConfigRateLimiter, async (req, res) => {
  const ownerCount = UserService.getOwnerCount();

  if (ownerCount > 0) {
    res.status(400).send({ status: 'error', reason: 'already-bootstraped' });
    return;
  }

  if (!(await checkPassword(req.body.password))) {
    res.status(400).send({ status: 'error', reason: 'invalid-password' });
    return;
  }

  const auth = UserService.getOpenIDConfig();

  if (!auth) {
    res
      .status(500)
      .send({ status: 'error', reason: 'OpenID configuration not found' });
    return;
  }

  try {
    const openIdConfig = JSON.parse(auth.extra_data);
    res.send({ status: 'ok', data: { openId: openIdConfig } });
  } catch {
    res
      .status(500)
      .send({ status: 'error', reason: 'Invalid OpenID configuration' });
  }
});

app.get('/callback', async (req, res) => {
  const { error, url } = await loginWithOpenIdFinalize(req.query);

  if (error) {

View on GitHub (pinned to d4334cb6e6)

Solutions

  1. Configure OpenID through the server's normal setup flow so the config record gets written, then retry
  2. Inspect the database (user/service table) for the missing OpenID config row and restore it from a backup
  3. Re-run any pending database migrations for the sync-server
  4. Check server logs around getOpenIDConfig for storage errors

Example fix

null
Defensive patterns

Strategy: fallback

Try / catch

if (res.status === 500 && (await res.json()).reason === 'OpenID configuration not found') {
  // fall back: run server setup/enable flow to create the config, then retry
}

Prevention

When it happens

Trigger: Calling POST /openid/config when no OpenID configuration row exists in the user service store (getOpenIDConfig returns null/undefined) — e.g. a corrupted or partially migrated database.

Common situations: Restored or hand-edited database missing the OpenID config row; version upgrade/migration that did not create the config entry; attempting config on a server where OpenID was never actually configured despite owner setup.

Related errors


AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29). Data as JSON: /api/errors/8e3ead977d728e17. Report an issue: GitHub.