use password with context

This commit is contained in:
peintnermax
2024-04-01 10:25:10 +02:00
parent 07788e91b2
commit 3239717ad4

View File

@@ -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
); );
}} }}
> >