import { AlertCircle } from "lucide-react";
import Card from "~/components/card";
import Code from "~/components/code";
export function OidcErrorNotice({ code }: { code: string }) {
return (
{getErrorMessage(code)}
);
}
function getErrorMessage(code: string) {
switch (code) {
case "error_no_query":
return (
The SSO provider did not correctly redirect back to Headplane with the required
parameters. Please ensure your SSO provider is configured correctly.
);
case "error_no_session":
case "error_invalid_session":
return (
Unable to complete SSO login due to missing or invalid session data. Ensure that your
Headplane cookie configuration is correct and that your browser is accepting cookies.
);
case "error_no_sub":
return (
The SSO provider did not return a valid user identifier. Please ensure your SSO provider
is correctly configured to provide the sub claim.
);
case "error_auth_failed":
return (
Authentication with the SSO provider failed. Please try again later. Headplane logs may
provide more information.
);
default:
return (
An unknown error occurred during OIDC authentication. Please try again later.
);
}
}