Loads OAuth provider configurations from defaults, file, or environment variables for authentication.
// Source: https://github.com/moltis-org/moltis | License: MIT | Copyright 2025 Fabien Penso
// Provided via justclaw.it.com; keep this notice with the code.
use std::collections::HashMap;
use crate::{config_dir::moltis_config_dir, types::OAuthConfig};
/// Default OAuth configurations for known providers.
fn builtin_defaults() -> HashMap<String, OAuthConfig> {
let mut m = HashMap::new();
// GitHub Copilot uses device flow (handled by the provider itself),
// but we store a config entry so `load_oauth_config` returns Some
// and the gateway recognises it as an OAuth provider.
m.insert("github-copilot".into(), OAuthConfig {
client_id: "Iv1.b507a08c87ecfe98".into(),
client_secret: None,
auth_url: "https://github.com/login/device/code".into(),
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key