{"record":{"id":"679f715bc01f6b3a","repo":"zeroclaw-labs/zeroclaw","slug":"auth-login-is-not-supported-for-this-provider-u","errorCode":null,"errorMessage":"`auth login` is not supported for this provider. Use `auth paste-token` or `auth setup-token` for bearer-token providers.","messagePattern":"`auth login` is not supported for this provider\\. Use `auth paste-token` or `auth setup-token` for bearer-token providers\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-providers/src/auth/mod.rs","lineNumber":1050,"sourceCode":"    /// No auth profile exists for this provider; caller decides whether\n    /// to surface a hint to run `auth login`.\n    NoProfile,\n}\n\n#[async_trait::async_trait]\npub trait AuthProviderFlow: Send + Sync {\n    /// Run the OAuth login flow. The default impl bails — only providers\n    /// with an OAuth login flow override. `import` is a path to an\n    /// existing token-set JSON file for providers that support importing\n    /// already-issued credentials (OpenAI Codex `~/.codex/auth.json`).\n    async fn login(\n        &self,\n        _ctx: &AuthFlowContext<'_>,\n        _profile: &str,\n        _device_code: bool,\n        _import: Option<&std::path::Path>,\n    ) -> Result<()> {\n        anyhow::bail!(\n            \"`auth login` is not supported for this provider. Use `auth paste-token` or \\\n             `auth setup-token` for bearer-token providers.\",\n        )\n    }\n\n    /// Resume an OAuth login from a paste-redirect URL/code. The default\n    /// impl bails for providers that don't expose a browser flow.\n    async fn paste_redirect(\n        &self,\n        _ctx: &AuthFlowContext<'_>,\n        _profile: &str,\n        _input: Option<&str>,\n    ) -> Result<()> {\n        anyhow::bail!(\n            \"`auth paste-redirect` is not supported for this provider. Only OpenAI Codex and \\\n             Gemini expose a browser-based OAuth flow.\",\n        )\n    }","sourceCodeStart":1032,"sourceCodeEnd":1068,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-providers/src/auth/mod.rs#L1032-L1068","documentation":"This is the default AuthProviderImpl::login implementation, inherited by every provider that authenticates with static bearer tokens (e.g. an API-key provider) instead of OAuth. Such providers have no authorization-code or device-code flow to run, so `auth login` unconditionally bails and the message points at the supported alternatives: `auth paste-token` or `auth setup-token`.","triggerScenarios":"Running `zeroclaw auth login --model-provider <bearer-provider> --profile <p>` for any provider that does not override the default login method.","commonSituations":"Copy-pasting the OAuth login instructions from a Codex/Gemini guide while configuring an API-key provider, or assuming all entries in `zeroclaw auth providers` support interactive login.","solutions":["Use `zeroclaw auth paste-token --model-provider <provider>` to store the API key directly","Or use `zeroclaw auth setup-token` if the provider supports guided token setup","Check the provider's auth method in the docs/provider table before choosing the subcommand"],"exampleFix":"# before\nzeroclaw auth login --model-provider my-bearer-provider --profile default\n\n# after\nzeroclaw auth paste-token --model-provider my-bearer-provider --profile default","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match provider.login(ctx, profile, false, None).await {\n    Ok(()) => Ok(()),\n    Err(e) if e.to_string().contains(\"paste-token\") => {\n        // bearer provider: fall back to token entry\n        provider.paste_token(ctx, profile, token).await\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Check the provider's supported auth methods before scripting `auth login`","For API-key providers, always use paste-token / setup-token"],"tags":["auth","cli","unsupported-operation","bearer-token"],"backgroundTag":"unsupported-auth-method","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}