mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-13 08:26:40 +00:00
Add OIDC authentication error response support
This commit is contained in:
@@ -14,8 +14,11 @@ export const dynamic = "force-dynamic";
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ orgId: string; idpId: string }>;
|
||||
searchParams: Promise<{
|
||||
code: string;
|
||||
state: string;
|
||||
code?: string;
|
||||
state?: string;
|
||||
error?: string;
|
||||
error_description?: string;
|
||||
error_uri?: string;
|
||||
}>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
@@ -59,6 +62,14 @@ export default async function Page(props: {
|
||||
}
|
||||
}
|
||||
|
||||
const providerError = searchParams.error
|
||||
? {
|
||||
error: searchParams.error,
|
||||
description: searchParams.error_description,
|
||||
uri: searchParams.error_uri
|
||||
}
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<>
|
||||
<ValidateOidcToken
|
||||
@@ -69,6 +80,7 @@ export default async function Page(props: {
|
||||
expectedState={searchParams.state}
|
||||
stateCookie={stateCookie}
|
||||
idp={{ name: foundIdp.name }}
|
||||
providerError={providerError}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user