Budibase/budibase · error

No google configuration found

Error message

No google configuration found

What it means

fetchGoogleCreds loads the Google datasource configuration from the config store and throws 'No google configuration found' when none exists. Google OAuth datasource flows cannot proceed without stored clientID/clientSecret configuration.

Source

Thrown at packages/backend-core/src/middleware/passport/datasource/google.ts:19

import * as google from "../sso/google"
import { Cookie } from "../../../constants"
import * as configs from "../../../configs"
import * as cache from "../../../cache"
import * as utils from "../../../utils"
import { UserCtx, SSOProfile } from "@budibase/types"
import { ssoSaveUserNoOp } from "../sso/sso"

const GoogleStrategy = require("passport-google-oauth").OAuth2Strategy

type Passport = {
  authenticate: any
}

async function fetchGoogleCreds() {
  let config = await configs.getGoogleDatasourceConfig()

  if (!config) {
    throw new Error("No google configuration found")
  }
  return config
}

export async function preAuth(
  passport: Passport,
  ctx: UserCtx,
  next: Function
) {
  // get the relevant config
  const googleConfig = await fetchGoogleCreds()
  const platformUrl = await configs.getPlatformUrl({ tenantAware: false })

  let callbackUrl = `${platformUrl}/api/global/auth/datasource/google/callback`
  const strategy = await google.strategyFactory(
    googleConfig,
    callbackUrl,
    ssoSaveUserNoOp

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Create and save the Google datasource config (clientID + clientSecret) in the builder before initiating auth
  2. Verify the config was saved under the correct tenant/production app
  3. Check configs DB (providers config documents) contains the google datasource doc
  4. Re-create the Google datasource if the underlying config document was removed

Example fix

// before
const strategy = await google.config(ctx) // throws if unconfigured
// after
const cfg = await configs.getGoogleDatasourceConfig()
if (!cfg) {
  await configs.saveGoogleDatasourceConfig({ clientID, clientSecret })
}
const strategy = await google.config(ctx)
Defensive patterns

Strategy: fallback

Validate before calling

const cfg = await configs.getGoogleDatasourceConfig()
if (!cfg?.clientID || !cfg?.clientSecret) {
  throw new Error("Save Google datasource credentials before authenticating")
}

Try / catch

try {
  await fetchGoogleCreds()
  // continue OAuth flow
} catch (e) {
  if (e.message === "No google configuration found") {
    return ctx.redirect("/settings/datasources/google") // prompt setup
  }
  throw e
}

Prevention

When it happens

Trigger: Starting a Google datasource OAuth flow (preAuth/authenticate) before any Google datasource config has been saved for the tenant/app, or after the config was deleted.

Common situations: Fresh environment where Google Cloud OAuth credentials were never entered; config stored under a different type/tenant; migration losing configs DB documents; typo'd datasource config creation.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/71dcd2367e9490d3. Report an issue: GitHub.