mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 18:12:22 +00:00
cleanup host on idp login
This commit is contained in:
@@ -30,10 +30,6 @@ export default async function Page(props: {
|
||||
}
|
||||
}
|
||||
|
||||
const host = process.env.VERCEL_URL
|
||||
? `https://${process.env.VERCEL_URL}`
|
||||
: "http://localhost:3000";
|
||||
|
||||
const loginSettings = await getLoginSettings(
|
||||
organization ?? defaultOrganization,
|
||||
);
|
||||
@@ -63,7 +59,6 @@ export default async function Page(props: {
|
||||
>
|
||||
{identityProviders && (
|
||||
<SignInWithIdp
|
||||
host={host}
|
||||
identityProviders={identityProviders}
|
||||
authRequestId={authRequestId}
|
||||
organization={organization ?? defaultOrganization} // use the organization from the searchParams here otherwise fallback to the default organization
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
IdentityProvider,
|
||||
IdentityProviderType,
|
||||
} from "@zitadel/proto/zitadel/settings/v2/login_settings_pb";
|
||||
import { headers } from "next/headers";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ReactNode, useState } from "react";
|
||||
import { Alert } from "./alert";
|
||||
@@ -18,7 +19,6 @@ import { SignInWithGoogle } from "./idps/sign-in-with-google";
|
||||
|
||||
export interface SignInWithIDPProps {
|
||||
children?: ReactNode;
|
||||
host: string;
|
||||
identityProviders: IdentityProvider[];
|
||||
authRequestId?: string;
|
||||
organization?: string;
|
||||
@@ -26,7 +26,6 @@ export interface SignInWithIDPProps {
|
||||
}
|
||||
|
||||
export function SignInWithIdp({
|
||||
host,
|
||||
identityProviders,
|
||||
authRequestId,
|
||||
organization,
|
||||
@@ -53,6 +52,8 @@ export function SignInWithIdp({
|
||||
params.set("organization", organization);
|
||||
}
|
||||
|
||||
const host = (await headers()).get("host");
|
||||
|
||||
const response = await startIDPFlow({
|
||||
idpId,
|
||||
successUrl:
|
||||
|
||||
Reference in New Issue
Block a user