Skip to content

Commit

Permalink
fix: add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
yordis committed Jun 7, 2024
1 parent 01d5d79 commit 2d5810a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/login/src/lib/demos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const demos: { name: string; items: Item[] }[] = [
},
{
name: "IDP Register",
slug: "register/idp",
slug: "idp",
description: "Add a user from an external identity provider",
},
],
Expand Down
2 changes: 2 additions & 0 deletions apps/login/src/ui/SessionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default function SessionItem({
reload: () => void;
authRequestId?: string;
}) {
// TODO: remove casting when bufbuild/protobuf-es@v2 is released
session = Session.fromJson(session as any);
const [loading, setLoading] = useState<boolean>(false);

async function clearSession(id: string) {
Expand Down
6 changes: 5 additions & 1 deletion apps/login/src/ui/SignInWithIDP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import {
import { useRouter } from "next/navigation";
import { ProviderSlug } from "@/lib/demos";
import Alert from "./Alert";
import {IdentityProvider} from "@zitadel/proto/zitadel/settings/v2beta/login_settings_pb";

export interface SignInWithIDPProps {
children?: ReactNode;
host: string;
identityProviders: any[];
identityProviders: IdentityProvider[];
authRequestId?: string;
organization?: string;
startIDPFlowPath?: (idpId: string) => string;
Expand All @@ -30,6 +31,9 @@ export function SignInWithIDP({
organization,
startIDPFlowPath = START_IDP_FLOW_PATH,
}: SignInWithIDPProps) {
// TODO: remove casting when bufbuild/protobuf-es@v2 is released
identityProviders = identityProviders.map((idp => IdentityProvider.fromJson(idp as any)));

const [loading, setLoading] = useState<boolean>(false);
const [error, setError] = useState<string>("");
const router = useRouter();
Expand Down

0 comments on commit 2d5810a

Please sign in to comment.