+
+Requests to the APIs made:
+
+- `getLoginSettings(org?)`
+- `getPasswordComplexitySettings(user?)`
+- `getBrandingSettings(org?)`
+- `getSession()`
+- `setPassword()`
+
+> NOTE: The request to change the password is using the session of the user itself not the service user, therefore no code is required.
+
+### /password/set
+
+This page allows to set a password. It is used after a user has requested to reset the password on the `/password` page.
+
+
+
+Requests to the APIs made:
+
+- `getLoginSettings(org?)`
+- `getPasswordComplexitySettings(user?)`
+- `getBrandingSettings(org?)`
+- `getUserByID()`
+- `setPassword()`
+
+The page allows to enter a code or be invoked directly from a email link which prefills the code. The user can enter a new password and submit.
+
### /otp/[method]
This page shows a code field to check an otp method. The session of the user is then hydrated with the respective factor. Supported methods are `time-based`, `sms` and `email`.
diff --git a/apps/login/screenshots/password_change.png b/apps/login/screenshots/password_change.png
new file mode 100644
index 00000000000..183de6df342
Binary files /dev/null and b/apps/login/screenshots/password_change.png differ
diff --git a/apps/login/screenshots/password_set.png b/apps/login/screenshots/password_set.png
new file mode 100644
index 00000000000..15b5ff49ad5
Binary files /dev/null and b/apps/login/screenshots/password_set.png differ
diff --git a/apps/login/src/app/(login)/me/change-password/page.tsx b/apps/login/src/app/(login)/me/change-password/page.tsx
deleted file mode 100644
index d87f184ac99..00000000000
--- a/apps/login/src/app/(login)/me/change-password/page.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Alert } from "@/components/alert";
-import { ChangePasswordForm } from "@/components/change-password-form";
-import { DynamicTheme } from "@/components/dynamic-theme";
-import { UserAvatar } from "@/components/user-avatar";
-import { getSessionCookieById } from "@/lib/cookies";
-import {
- getBrandingSettings,
- getPasswordComplexitySettings,
- getSession,
-} from "@/lib/zitadel";
-
-export default async function Page({
- searchParams,
-}: {
- searchParams: RecordSet the password for your account
- - {!session && ( -{t("change.description")}
+ + {/* show error only if usernames should be shown to be unknown */} + {(!sessionFactors || !loginName) && + !loginSettings?.ignoreUnknownUsernames && ( +{t("description")}
+{t("verify.description")}
{/* show error only if usernames should be shown to be unknown */} {(!sessionFactors || !loginName) && diff --git a/apps/login/src/app/(login)/password/set/page.tsx b/apps/login/src/app/(login)/password/set/page.tsx new file mode 100644 index 00000000000..e99f79ef923 --- /dev/null +++ b/apps/login/src/app/(login)/password/set/page.tsx @@ -0,0 +1,81 @@ +import { Alert, AlertType } from "@/components/alert"; +import { DynamicTheme } from "@/components/dynamic-theme"; +import { SetPasswordForm } from "@/components/set-password-form"; +import { UserAvatar } from "@/components/user-avatar"; +import { loadMostRecentSession } from "@/lib/session"; +import { + getBrandingSettings, + getLoginSettings, + getPasswordComplexitySettings, +} from "@/lib/zitadel"; +import { getLocale, getTranslations } from "next-intl/server"; + +export default async function Page({ + searchParams, +}: { + searchParams: Record{t("set.description")}
+ + {/* show error only if usernames should be shown to be unknown */} + {(!sessionFactors || !loginName) && + !loginSettings?.ignoreUnknownUsernames && ( +{t("description")}
{legal && passwordComplexitySettings && ( -