{"record":{"id":"75c7b115c3ab7432","repo":"nextauthjs/next-auth","slug":"provider-with-id-providerid-not-found-availa","errorCode":null,"errorMessage":"Provider with id \"${providerId}\" not found. Available providers: [${availableProviders}].","messagePattern":"Provider with id \"(.+?)\" not found\\. Available providers: \\[(.+?)\\]\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/lib/utils/providers.ts","lineNumber":68,"sourceCode":"        normalized.authorization?.url.searchParams.get(\"response_mode\") ===\n        \"form_post\"\n      ) {\n        delete normalized.redirectProxyUrl\n      }\n\n      // @ts-expect-error Symbols don't get merged by the `merge` function\n      // so we need to do it manually.\n      normalized[customFetch] ??= userOptions?.[customFetch]\n      return normalized\n    }\n\n    return merged as InternalProvider\n  })\n\n  const provider = providers.find(({ id }) => id === providerId)\n  if (providerId && !provider) {\n    const availableProviders = providers.map((p) => p.id).join(\", \")\n    throw new Error(\n      `Provider with id \"${providerId}\" not found. Available providers: [${availableProviders}].`\n    )\n  }\n\n  return { providers, provider }\n}\n\n// TODO: Also add discovery here, if some endpoints/config are missing.\n// We should return both a client and authorization server config.\nfunction normalizeOAuth(\n  c: OAuthConfig<any> | OAuthUserConfig<any>\n): OAuthConfigInternal<any> | object {\n  if (c.issuer) c.wellKnown ??= `${c.issuer}/.well-known/openid-configuration`\n\n  const authorization = normalizeEndpoint(c.authorization, c.issuer)\n  if (authorization && !authorization.url?.searchParams.has(\"scope\")) {\n    authorization.url.searchParams.set(\"scope\", \"openid profile email\")\n  }","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/nextauthjs/next-auth/blob/a1a16a5a7780488c7449feece410033f445d0b31/packages/core/src/lib/utils/providers.ts#L50-L86","documentation":"parseProviders looks up the provider whose id matches the requested providerId; if none of the configured providers has that id, it throws with the list of available ids. This guards against requesting signin/callback for a provider that was never configured.","triggerScenarios":"Calling signIn('gitub') (typo), or hitting /auth/callback/google while only GitHub is configured; provider ids in the providers array not matching the id used in the request.","commonSituations":"Typos in provider id strings; provider configured only in one environment's config branch; renaming a provider id after URLs/links were hardcoded; case mismatch in the id.","solutions":["Fix the providerId string to exactly match an id in your providers config array","Log or read the \"Available providers\" list in the error message and use one of those ids","Ensure the provider is included in all environments' config (not gated behind a condition)","Restart the dev server after editing providers config so changes are picked up"],"exampleFix":"// before\nproviders: [GitHub],\n// ... signIn(\"gitub\")\n// after\nproviders: [GitHub],\n// ... signIn(\"github\")","handlingStrategy":"validation","validationCode":"const ids = providers.map(p => p.id);\nif (!ids.includes(providerId)) throw new Error(`Unknown provider \"${providerId}\"; configured: ${ids.join(\", \")}`);","typeGuard":"function isConfiguredProvider(id: string, providers: {id:string}[]): id is string { return providers.some(p => p.id === id); }","tryCatchPattern":"try { return await signIn(providerId) } catch (e) { if (String(e.message).match(/Provider with id .* not found/)) { console.error(\"Available:\", e.message); return; } throw e; }","preventionTips":["Keep a single source-of-truth constant for provider ids shared by config and UI","Compare against the available-providers list in the error message","Beware case sensitivity: ids are matched exactly"],"tags":["config","provider-not-found","typo"],"backgroundTag":"provider-not-found","analyzedSha":"a1a16a5a7780488c7449feece410033f445d0b31","analyzedAt":"2026-08-28T21:52:38.200Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}