paperclipai/paperclip · error · HttpError
oauth_redirect_rejected
oauth_redirect_rejected
Error message
Remote OAuth endpoint redirected unexpectedly
What it means
SSRF/redirect safety guard in fetchRemoteHttpUrl: a redirect Location could not be re-validated by assertRemoteHttpUrlAllowed (or was missing/malformed), so following it is refused. Protects OAuth/token endpoints from redirect-based SSRF; the redirecting remote endpoint is at fault.
Source
Thrown at server/src/services/tool-access.ts:1410
command: template.command ?? null,
args: template.args ?? [],
envKeys: template.envKeys ?? [],
tools: template.tools.map((tool) => ({
name: tool.name,
title: tool.title ?? null,
description: tool.description ?? null,
inputSchema: tool.inputSchema ?? { type: "object", properties: {} },
annotations: tool.annotations ?? {},
})),
};
}
function toStdioCommandTemplate(row: typeof toolStdioCommandTemplates.$inferSelect): ToolStdioCommandTemplate {
return {
id: row.id,
companyId: row.companyId,
templateId: row.templateKey,
name: row.name,
title: row.name,
description: row.description,
status: row.status,
source: "admin",
command: row.command,
args: row.args ?? [],
envKeys: row.envKeys ?? [],
tools: (row.tools ?? [])
.map((tool) => normalizeToolDescriptor(tool))
.filter((tool): tool is McpToolDescriptor => Boolean(tool))
.map((tool) => ({
name: tool.name,
title: tool.title ?? null,
description: tool.description ?? null,
inputSchema: tool.inputSchema ?? { type: "object", properties: {} },
annotations: tool.annotations ?? {},
})),
createdByAgentId: row.createdByAgentId,View on GitHub (pinned to 01ad858492)
Solutions
- The OAuth endpoint sent an unexpected redirect. Verify the provider's authorization/issuer URL configuration and that no proxy is rewriting redirects.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-access.ts:1404 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/56a4e377d6d0304c.
Report an issue: GitHub.