mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 18:32:20 +00:00
linking failed page
This commit is contained in:
@@ -159,6 +159,29 @@ export default async function Page(props: {
|
||||
|
||||
const providerType = idpTypeToIdentityProviderType(idp.type);
|
||||
|
||||
if (link && options?.isLinkingAllowed) {
|
||||
console.log(userId);
|
||||
const idpLink = await addIDPLink(
|
||||
{
|
||||
id: idpInformation.idpId,
|
||||
userId: idpInformation.userId,
|
||||
userName: idpInformation.userName,
|
||||
},
|
||||
userId,
|
||||
);
|
||||
|
||||
if (!idpLink) {
|
||||
return linkingFailed(branding);
|
||||
} else {
|
||||
return linkingSuccess(
|
||||
userId,
|
||||
{ idpIntentId: id, idpIntentToken: token },
|
||||
authRequestId,
|
||||
branding,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// search for potential user via username, then link
|
||||
if (options?.isLinkingAllowed) {
|
||||
let foundUser;
|
||||
|
||||
Reference in New Issue
Block a user