mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 10:25:58 +00:00
use password with context
This commit is contained in:
@@ -207,13 +207,18 @@ export default function LoginPasskey({
|
|||||||
type="button"
|
type="button"
|
||||||
variant={ButtonVariants.Secondary}
|
variant={ButtonVariants.Secondary}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const params = { loginName, alt: "true" };
|
const params: any = { loginName, alt: "true" };
|
||||||
|
|
||||||
|
if (authRequestId) {
|
||||||
|
params.authRequestId = authRequestId;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (organization) {
|
||||||
|
params.organization = organization;
|
||||||
|
}
|
||||||
|
|
||||||
return router.push(
|
return router.push(
|
||||||
"/password?" +
|
"/password?" + new URLSearchParams(params) // alt is set because password is requested as alternative auth method, so passwordless prompt can be escaped
|
||||||
new URLSearchParams(
|
|
||||||
authRequestId ? { ...params, authRequestId } : params
|
|
||||||
) // alt is set because password is requested as alternative auth method, so passwordless prompt can be escaped
|
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user