{"record":{"id":"fd8209056ff479ce","repo":"we-promise/sure","slug":"omniauth-skipping-oidc-provider-name-miss","errorCode":null,"errorMessage":"[OmniAuth] Skipping OIDC provider '#{name}' - missing required configuration","messagePattern":"\\[OmniAuth\\] Skipping OIDC provider '#(.+?)' - missing required configuration","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"config/initializers/omniauth.rb","lineNumber":44,"sourceCode":"\n  Rack::Response.new([ \"302 Moved\" ], 302, \"Location\" => \"/auth/failure?message=#{message}&strategy=#{strategy&.name}\").finish\nend\n\nRails.application.config.middleware.use OmniAuth::Builder do\n  # Load providers from either YAML or DB via ProviderLoader\n  providers = ProviderLoader.load_providers\n\n  providers.each do |raw_cfg|\n    cfg = raw_cfg.deep_symbolize_keys\n    strategy = cfg[:strategy].to_s\n    name = (cfg[:name] || cfg[:id]).to_s\n\n    case strategy\n    when \"openid_connect\"\n      oidc_options = Oidc::ProviderOptionsBuilder.call(cfg)\n\n      unless oidc_options.present?\n        Rails.logger.warn(\"[OmniAuth] Skipping OIDC provider '#{name}' - missing required configuration\")\n        next\n      end\n\n      provider :openid_connect, oidc_options\n\n      Rails.configuration.x.auth.oidc_enabled = true\n      Rails.configuration.x.auth.sso_providers << cfg.merge(name: name, issuer: oidc_options[:issuer])\n\n    when \"google_oauth2\"\n      client_id = cfg[:client_id].presence || ENV[\"GOOGLE_OAUTH_CLIENT_ID\"].presence\n      client_secret = cfg[:client_secret].presence || ENV[\"GOOGLE_OAUTH_CLIENT_SECRET\"].presence\n\n      # Test environment fallback\n      if Rails.env.test?\n        client_id ||= \"test_client_id\"\n        client_secret ||= \"test_client_secret\"\n      end\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/we-promise/sure/blob/e69894adb92547273377398c15f45c979cd9416a/config/initializers/omniauth.rb#L26-L62","documentation":"Startup warning from config/initializers/omniauth.rb (line 44): for a provider configured with strategy openid_connect, Oidc::ProviderOptionsBuilder.call(cfg) returned an empty/nil options hash — required OIDC configuration (discovery/issuer, client_id, client_secret, etc.) is missing from the providers config. The provider is then skipped (next), so it does not appear in OmniAuth, auth.oidc_enabled is NOT set true, and no SSO button is rendered for it. Other providers in the list still load.","triggerScenarios":"Declaring an openid_connect provider in the providers config (providers.yml or equivalent loaded via ProviderLoader) whose entry lacks required keys — e.g. missing client_id/secret with no ENV fallback, missing issuer or discovery URL — so the options builder yields nothing at boot.","commonSituations":"Self-hosted admins enabling SSO with a partially filled provider stanza; renaming config keys (client-id vs client_id) so the builder reads nils; forgetting to set the OIDC client secret env var referenced by the config.","solutions":["Compare the skipped provider's config against the OIDC provider template/docs and fill the required keys (issuer/discovery, client_id, client_secret) or their ENV equivalents.","Check the boot log for the exact provider name in the warning — only that one is skipped; fix and reboot to register it.","After fixing, verify auth.oidc_enabled became true and the provider shows in sso_providers (login page).","If the provider was meant to be disabled, remove its stanza entirely so the warning noise goes away."],"exampleFix":"// before\n# providers.yml entry missing secret -> '[OmniAuth] Skipping OIDC provider acme...'\n- id: acme\n  strategy: openid_connect\n  issuer: https://sso.acme.test\n\n// after\n- id: acme\n  strategy: openid_connect\n  issuer: https://sso.acme.test\n  client_id: <%= ENV['ACME_CLIENT_ID'] %>\n  client_secret: <%= ENV['ACME_CLIENT_SECRET'] %>","handlingStrategy":"validation","validationCode":"cfg = provider_config.deep_symbolize_keys\nrequired = %i[issuer client_id client_secret]\nmissing = required.reject { |k| cfg[k].present? || ENV[k.to_s.upcase].present? }\nRails.logger.warn(\"#{cfg[:id]}: missing #{missing.join(', ')}\") if missing.any?","typeGuard":"oidc_options = Oidc::ProviderOptionsBuilder.call(cfg)\noidc_options.present? # falsy means the provider will be skipped","tryCatchPattern":null,"preventionTips":["Validate provider stanzas with a boot check or spec asserting Oidc::ProviderOptionsBuilder.call(cfg).present? for each openid_connect entry.","Mirror required keys in an example config and in deployment docs for self-hosters.","After config changes, confirm the login page shows every intended SSO button; a missing one usually means this warning fired at boot."],"tags":["omniauth","oidc","sso","configuration","startup-warning"],"backgroundTag":"oidc-provider-misconfigured","analyzedSha":"e69894adb92547273377398c15f45c979cd9416a","analyzedAt":"2026-08-21T18:22:41.165Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}