• Just what I needed when I wanted to create my own plugin. However, it has a few bugs and minor good-to-haves:

    1. If I only activate it on one of the sites in a MultiSite, it does not work because it relies on the base prefix to be accessed.
    2. If I activate notifications for users, it does not notify on each subdomain in a MultiSite. Since passkeys are unique for each domain/subdomain this should be fixed.
    3. The error, notice and button in the login form should be formated as native WP tags.
    4. I would have prefered to hide the settings under Settings in the menu. That is where it belongs.

    Still, I will have this as one of the few default external plugins to use for now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mohamed Endisha

    (@endisha)

    @martinfors

    Thank you for your review and support; I really appreciate it. Feedback like yours helps me make the plugin more powerful and reduce errors.

    It would be even better if you could share this in the support forum for wider visibility.

    I will carefully check your points and try to reproduce the issue to ensure we catch them and provide a solid solution in the next releases.

    —–

    You can try this snippet — it will detect your subdomain rather than just the main domain:

    add_filter('secure_passkeys_web_authn_relying_party_id', function ($domain) {
    $allowed_domains = [
    'sub1.domain.com',
    'sub2.domain.com',
    ];

    $host = $_SERVER['HTTP_HOST'] ?? '';

    if (in_array($host, $allowed_domains, true)) {
    return $host;
    }

    return $domain;
    });

    Thank you

    Thread Starter martinfors

    (@martinfors)

    Should I restart as a support thread?

    I can’t even get the script above to be used. I am calling it with:
    add_filter(‘secure_passkeys_web_authn_relying_party_id’, array($obj_custom_login, ‘secure_passkeys_web_authn_relying_party_id’));

    …and then in the class I run:
    function secure_passkeys_web_authn_relying_party_id($domain)
    {
    $allowed_domains = [];
    $result = get_sites();

    foreach($result as $r)
    {
    $allowed_domains[] = $r->domain;
    }

    $host = ($_SERVER[‘HTTP_HOST’] ?? ”);

    error_log(__FUNCTION__.”: “.$host.” in “.var_export($allowed_domains, true));

    if(in_array($host, $allowed_domains, true))
    {
    return $host;
    }

    return $domain;
    }

    …but nothing is saved to the log and no notification is displayed.

    For a clearer user experience I would also change “Enable or disable the restriction for the maximum number of passkeys per user.” into “Enable the restriction for the maximum number of passkeys per user.”. “Enable or disable…” just confuses users in the settings. When the checkbox is checked it is enabled, and when it is unchecked is disabled.

    Thread Starter martinfors

    (@martinfors)

    And thanks for your quick reply!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this review.