From 30091ddb17808b9f729c39bea7b20c1a70cb8655 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Tue, 3 Dec 2024 13:48:07 +0100 Subject: [PATCH] cleanup --- apps/login/src/app/(login)/authenticator/set/page.tsx | 4 ++++ apps/login/src/components/sign-in-with-idp.tsx | 2 ++ apps/login/src/components/username-form.tsx | 2 -- apps/login/src/lib/server/password.ts | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/login/src/app/(login)/authenticator/set/page.tsx b/apps/login/src/app/(login)/authenticator/set/page.tsx index f4ee7024fea..36294c8c1cf 100644 --- a/apps/login/src/app/(login)/authenticator/set/page.tsx +++ b/apps/login/src/app/(login)/authenticator/set/page.tsx @@ -86,6 +86,8 @@ export default async function Page(props: { sessionWithData.factors?.user?.organizationId, ); + /* - TODO: Implement after https://github.com/zitadel/zitadel/issues/8981 */ + // const identityProviders = await getActiveIdentityProviders( // sessionWithData.factors?.user?.organizationId, // ).then((resp) => { @@ -134,6 +136,8 @@ export default async function Page(props: { > )} + {/* - TODO: Implement after https://github.com/zitadel/zitadel/issues/8981 */} + {/*

or sign in with an Identity Provider

diff --git a/apps/login/src/components/sign-in-with-idp.tsx b/apps/login/src/components/sign-in-with-idp.tsx index e94ba8364bc..a10680eae51 100644 --- a/apps/login/src/components/sign-in-with-idp.tsx +++ b/apps/login/src/components/sign-in-with-idp.tsx @@ -78,6 +78,8 @@ export function SignInWithIdp({
{identityProviders && identityProviders + /* - TODO: Implement after https://github.com/zitadel/zitadel/issues/8981 */ + // .filter((idp) => // linkOnly ? idp.config?.options.isLinkingAllowed : true, // ) diff --git a/apps/login/src/components/username-form.tsx b/apps/login/src/components/username-form.tsx index ab56bc2926d..7d18623aba2 100644 --- a/apps/login/src/components/username-form.tsx +++ b/apps/login/src/components/username-form.tsx @@ -61,8 +61,6 @@ export function UsernameForm({ setLoading(false); }); - console.log(res, "res"); - if (res?.redirect) { return router.push(res.redirect); } diff --git a/apps/login/src/lib/server/password.ts b/apps/login/src/lib/server/password.ts index c4794c635d0..5e202aabd51 100644 --- a/apps/login/src/lib/server/password.ts +++ b/apps/login/src/lib/server/password.ts @@ -149,7 +149,7 @@ export async function sendPassword(command: UpdateSessionCommand) { ); const humanUser = user.type.case === "human" ? user.type.value : undefined; - console.log("humanUser", humanUser); + if ( availableSecondFactors?.length == 0 && humanUser?.passwordChangeRequired