{"record":{"id":"02b94e808cdbb767","repo":"zeroclaw-labs/zeroclaw","slug":"auth-paste-redirect-is-not-supported-for-this-pr","errorCode":null,"errorMessage":"`auth paste-redirect` is not supported for this provider. Only OpenAI Codex and Gemini expose a browser-based OAuth flow.","messagePattern":"`auth paste-redirect` is not supported for this provider\\. Only OpenAI Codex and Gemini expose a browser-based OAuth flow\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-providers/src/auth/mod.rs","lineNumber":1064,"sourceCode":"        _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    }\n\n    /// Refresh the access token for `profile_override` (or active\n    /// profile) and report status. Default impl bails for providers\n    /// without a refresh flow.\n    async fn refresh_status(\n        &self,\n        _ctx: &AuthFlowContext<'_>,\n        _profile_override: Option<&str>,\n    ) -> Result<RefreshStatus> {\n        anyhow::bail!(\n            \"`auth refresh` is not supported for this provider. Only OpenAI Codex and Gemini \\\n             have an in-process token-refresh flow.\",\n        )\n    }","sourceCodeStart":1046,"sourceCodeEnd":1082,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-providers/src/auth/mod.rs#L1046-L1082","documentation":"Default AuthProviderImpl::paste_redirect, used by providers without a browser OAuth flow. paste_redirect resumes a login by exchanging a pasted redirect URL/code; only the OpenAI Codex and Gemini implementations (and xAI's own override) have that flow, so any other provider hitting this method bails immediately. handle_auth_command dispatches `auth paste-redirect` here.","triggerScenarios":"Running `zeroclaw auth paste-redirect --model-provider <provider>` for a bearer-token or otherwise non-browser provider (anything except openai-codex/gemini/xai).","commonSituations":"Following the Codex login tutorial against a different default provider, or forgetting to pass --model-provider so the command targets the wrong default.","solutions":["Switch to the provider that actually has the flow: `zeroclaw auth paste-redirect --model-provider openai-codex` (or gemini / xai)","For non-OAuth providers use `auth paste-token` / `auth setup-token` instead","Verify a pending login exists first (`auth login` must have started it) before paste-redirect"],"exampleFix":"# before\nzeroclaw auth paste-redirect --model-provider anthropic\n\n# after\nzeroclaw auth paste-redirect --model-provider openai-codex","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match provider.paste_redirect(ctx, profile, input).await {\n    Ok(()) => Ok(()),\n    Err(e) if e.to_string().contains(\"paste-redirect` is not supported\") => {\n        eprintln!(\"this provider has no browser OAuth flow; use auth paste-token\");\n        Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Only run paste-redirect for openai-codex, gemini, and xai","Always pass --model-provider explicitly on auth subcommands"],"tags":["auth","cli","unsupported-operation","oauth2"],"backgroundTag":"unsupported-auth-method","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}