mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-02-24 09:52:00 +00:00
* chore: add oidc base config * wip: authorize page * feat: implement basic oidc functionality * refactor: implement oidc following tinyauth patterns * feat: adapt frontend to oidc flow * fix: review comments * fix: oidc review comments * feat: refresh token grant type support * feat: cleanup expired oidc sessions * feat: frontend i18n * fix: fix typo in error screen * tests: add basic testing * fix: more review comments * refactor: rework oidc error messages * feat: openid discovery endpoint * feat: jwk endpoint * i18n: fix typo * fix: more rabbit nitpicks * fix: final review comments * i18n: authorize page error messages
36 lines
896 B
TypeScript
36 lines
896 B
TypeScript
import {
|
|
Card,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { useTranslation } from "react-i18next";
|
|
import { useLocation } from "react-router";
|
|
|
|
export const ErrorPage = () => {
|
|
const { t } = useTranslation();
|
|
const { search } = useLocation();
|
|
const searchParams = new URLSearchParams(search);
|
|
const error = searchParams.get("error") ?? "";
|
|
|
|
return (
|
|
<Card className="min-w-xs sm:min-w-sm">
|
|
<CardHeader>
|
|
<CardTitle className="text-3xl">{t("errorTitle")}</CardTitle>
|
|
<CardDescription className="flex flex-col gap-1.5">
|
|
{error ? (
|
|
<>
|
|
<p>{t("errorSubtitleInfo")}</p>
|
|
<pre>{error}</pre>
|
|
</>
|
|
) : (
|
|
<>
|
|
<p>{t("errorSubtitle")}</p>
|
|
</>
|
|
)}
|
|
</CardDescription>
|
|
</CardHeader>
|
|
</Card>
|
|
);
|
|
};
|