]> git.proxmox.com Git - pve-access-control.git/blobdiff - src/PVE/AccessControl.pm
tfa: pass whole webauthn config to 'set_webauthn_config'
[pve-access-control.git] / src / PVE / AccessControl.pm
index 91b3aff487ed38135bb541fe14d16972bdec3cd3..c32dcc303fabc2498ae0cdfc16c4759962213690 100644 (file)
@@ -921,13 +921,8 @@ sub configure_u2f_and_wa : prototype($) {
        warn "u2f unavailable, configuration error: $@\n" if $@;
     }
     if (my $wa = $dc->{webauthn}) {
-       eval {
-           $tfa_cfg->set_webauthn_config({
-               origin => $wa->{origin} // $get_origin->(),
-               rp => $wa->{rp},
-               id => $wa->{id},
-           });
-       };
+       $wa->{origin} //= $get_origin->();
+       eval { $tfa_cfg->set_webauthn_config({%$wa}) };
        warn "webauthn unavailable, configuration error: $@\n" if $@;
     }
 }