Files
OmniRoute/src/shared/components/NoAuthProviderCard.tsx
diegosouzapw fd28e772a8 fix(dashboard): show no-auth card for free providers instead of OAuth modal
OpenCode Free (noAuth: true) was routed through OAuthModal which tried to call
a non-existent /api/oauth/opencode/authorize endpoint, resulting in a 500 error.

Detect noAuth free providers via FREE_PROVIDERS[id]?.noAuth and render a
NoAuthProviderCard (lock_open + description) instead of the connections section
with the "+ Add" button that triggered the broken flow.
2026-05-16 21:05:49 -03:00

22 lines
695 B
TypeScript

"use client";
import Card from "./Card";
export default function NoAuthProviderCard() {
return (
<Card>
<div className="flex items-center gap-3">
<div className="inline-flex shrink-0 items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500">
<span className="material-symbols-outlined text-[20px]">lock_open</span>
</div>
<div className="flex-1">
<p className="text-sm font-medium">No authentication required</p>
<p className="text-xs text-text-muted">
This provider is ready to use immediately no signup or API key needed.
</p>
</div>
</div>
</Card>
);
}