Skip to content

Commit 5e9fc24

Browse files
committed
feat: pass specific error messages to the linking failed page and add top margin to its error display.
1 parent 77e2fbc commit 5e9fc24

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/login/src/app/(main)/(boxed)/idp/[provider]/success/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ export default async function Page(props: {
284284
});
285285
} catch (error) {
286286
console.error(error);
287-
return linkingFailed();
287+
return linkingFailed((error as Error).message);
288288
}
289289

290290
if (!idpLink) {
291-
return linkingFailed();
291+
return linkingFailed("Could not link identity provider");
292292
} else {
293293
return linkingSuccess(
294294
resolvedUserId,

apps/login/src/components/idps/pages/linking-failed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export async function linkingFailed(error?: string) {
1111
<Translated i18nKey="linkingError.description" namespace="idp" />
1212
</p>
1313
{error && (
14-
<div className="w-full">
14+
<div className="mt-4 w-full">
1515
{<Alert type={AlertType.ALERT}>{error}</Alert>}
1616
</div>
1717
)}

0 commit comments

Comments
 (0)