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,6 +66,7 @@ export async function registerUser(command: RegisterUserCommand) {
|
||||
return { error: "Could not create session" };
|
||||
}
|
||||
|
||||
if (!command.password) {
|
||||
const params = new URLSearchParams({
|
||||
loginName: session.factors.user.loginName,
|
||||
organization: session.factors.user.organizationId,
|
||||
@@ -76,4 +77,19 @@ export async function registerUser(command: RegisterUserCommand) {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user