Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
peintnermax committed Dec 27, 2024
1 parent ab2136d commit d853214
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/login/src/app/(login)/idp/[provider]/success/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export default async function Page(props: {

const providerType = idpTypeToIdentityProviderType(idp.type);

if (link && options?.isLinkingAllowed) {
if (link) {
if (!options?.isLinkingAllowed) {
return linkingFailed(branding, "Linking is no longer allowed");
}

let idpLink;
try {
idpLink = await addIDPLink(
Expand Down Expand Up @@ -155,10 +159,6 @@ export default async function Page(props: {
}
}

if (link) {
return linkingFailed(branding);
}

if (options?.isCreationAllowed && options.isAutoCreation) {
let orgToRegisterOn: string | undefined = organization;

Expand Down

0 comments on commit d853214

Please sign in to comment.