password page changes, doc

This commit is contained in:
peintnermax
2024-09-16 11:36:44 +02:00
parent 52ebcece0c
commit 70a1ca25d9
7 changed files with 60 additions and 46 deletions

View File

@@ -1,6 +1,5 @@
"use server";
import { PasskeysType } from "@zitadel/proto/zitadel/settings/v2/login_settings_pb";
import { AuthenticationMethodType } from "@zitadel/proto/zitadel/user/v2/user_service_pb";
import { headers } from "next/headers";
import { redirect } from "next/navigation";
@@ -108,13 +107,6 @@ export async function sendLoginname(command: SendLoginnameCommand) {
command.organization ?? session.factors?.user?.organizationId;
}
if (
loginSettings?.passkeysType &&
loginSettings?.passkeysType === PasskeysType.ALLOWED
) {
paramsPassword.promptPasswordless = `true`;
}
if (command.authRequestId) {
paramsPassword.authRequestId = command.authRequestId;
}
@@ -164,10 +156,6 @@ export async function sendLoginname(command: SendLoginnameCommand) {
// user has no passkey setup and login settings allow passkeys
const paramsPasswordDefault: any = { loginName: command.loginName };
if (loginSettings?.passkeysType === PasskeysType.ALLOWED) {
paramsPasswordDefault.promptPasswordless = `true`; // PasskeysType.PASSKEYS_TYPE_ALLOWED,
}
if (command.authRequestId) {
paramsPasswordDefault.authRequestId = command.authRequestId;
}
@@ -235,10 +223,6 @@ export async function sendLoginname(command: SendLoginnameCommand) {
if (loginSettings?.ignoreUnknownUsernames) {
const paramsPasswordDefault: any = { loginName: command.loginName };
if (loginSettings?.passkeysType === PasskeysType.ALLOWED) {
paramsPasswordDefault.promptPasswordless = `true`;
}
if (command.authRequestId) {
paramsPasswordDefault.authRequestId = command.authRequestId;
}