mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 08:23:16 +00:00
redirect from server
This commit is contained in:
@@ -66,14 +66,30 @@ export async function registerUser(command: RegisterUserCommand) {
|
|||||||
return { error: "Could not create session" };
|
return { error: "Could not create session" };
|
||||||
}
|
}
|
||||||
|
|
||||||
const params = new URLSearchParams({
|
if (!command.password) {
|
||||||
loginName: session.factors.user.loginName,
|
const params = new URLSearchParams({
|
||||||
organization: session.factors.user.organizationId,
|
loginName: session.factors.user.loginName,
|
||||||
});
|
organization: session.factors.user.organizationId,
|
||||||
|
});
|
||||||
|
|
||||||
if (command.authRequestId) {
|
if (command.authRequestId) {
|
||||||
params.append("authRequestId", command.authRequestId);
|
params.append("authRequestId", command.authRequestId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect("/passkey/set?" + params);
|
||||||
|
} else {
|
||||||
|
const params = new URLSearchParams({
|
||||||
|
loginName: session.factors.user.loginName,
|
||||||
|
organization: session.factors.user.organizationId,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (command.authRequestId && session.userId) {
|
||||||
|
params.append("authRequest", command.authRequestId);
|
||||||
|
params.append("userId", session.userId);
|
||||||
|
|
||||||
|
return redirect("/login?" + params);
|
||||||
|
} else {
|
||||||
|
return redirect("/signedin?" + params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect("/passkey/set?" + params);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user