Skip to content

Commit

Permalink
linking success page
Browse files Browse the repository at this point in the history
  • Loading branch information
peintnermax committed Dec 16, 2024
1 parent 18d8655 commit 725d031
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion apps/login/src/app/(login)/idp/[provider]/success/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,32 @@ async function loginSuccess(
);
}

async function linkingSuccess(
userId: string,
idpIntent: { idpIntentId: string; idpIntentToken: string },
authRequestId?: string,
branding?: BrandingSettings,
) {
const locale = getLocale();
const t = await getTranslations({ locale, namespace: "idp" });

return (
<DynamicTheme branding={branding}>
<div className="flex flex-col items-center space-y-4">
<h1>{t("linkingSuccess.title")}</h1>
<div>
{t("linkingSuccess.description")}
<IdpSignin
userId={userId}
idpIntent={idpIntent}
authRequestId={authRequestId}
/>
</div>
</div>
</DynamicTheme>
);
}

export default async function Page(props: {
searchParams: Promise<Record<string | number | symbol, string | undefined>>;
params: Promise<{ provider: string }>;
Expand Down Expand Up @@ -153,7 +179,7 @@ export default async function Page(props: {
);
});

return loginSuccess(
return linkingSuccess(
userId,
{ idpIntentId: id, idpIntentToken: token },
authRequestId,
Expand Down

0 comments on commit 725d031

Please sign in to comment.