Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter mengelsen

    (@mengelsen)

    @endisha, can you tell me why wp_login (specifically:secure_passkeys_web_authn_validate_user_sign_in_enable_wp_login')
    has a default value of FALSE (__return_false)?

    Is there a security concern with having this value set to TRUE?

    Thread Starter mengelsen

    (@mengelsen)

    Claude Cowork offered-up (2) possible solutions for creating a bridge/integration between “Secure Passkey” and “Simple Membership”:

    Path A — Flip the default filter value from FALSE to TRUE

    Because Simple Membership is already listening on wp_login, the simplest possible integration is to tell Secure Passkeys to fire it. A single filter return value is enough.

    add_filter(
    'secure_passkeys_web_authn_validate_user_sign_in_enable_wp_login',
    '__return_true'
    );

    Path B — An Explicit Bridge between the two plugins

    If the site owner would rather not fire wp_login globally from the passkey flow, the same result can be achieved by hooking Secure Passkeys’s own custom action and calling the SWPM bridge directly. This is also the path to pick when there is non-trivial logic to run — for example, vetoing passkey logins for suspended Simple Membership accounts.

    add_action( 'secure_passkeys_web_authn_sign_in', function ( $user ) {
    if ( ! class_exists( 'SwpmAuth' ) ) { return; } // SWPM not loaded
    $swpm = SwpmAuth::get_instance();
    if ( $swpm->is_logged_in() ) { return; } // already bridged
    $swpm->login_to_swpm_using_wp_user( $user );
    }, 20, 1 );

    As for me, I’m leaning towards Path B. An in-depth Integration report can be found here.

    I also asked Claude to write a small 1-file plugin for me. It contains:

    • passkey-swpm-bridge.php — a single self-contained class, Passkey_SWPM_Bridge, that hooks secure_passkeys_web_authn_sign_in at priority 20 and calls SwpmAuth::get_instance()->login_to_swpm_using_wp_user( $user ). Defensive guards cover missing dependencies (SWPM not loaded, bridge method absent, already-bridged session, non-WP_User input). A temporary $_REQUEST['rememberme'] = 1 override before the call aligns SWPM’s cookie lifetime with Secure Passkeys’ persistent wp_set_auth_cookie($user_id, true) — then properly restores the prior state in a finallyblock. Outcomes are logged via SwpmLog::log_auth_debug when available so entries land next to SWPM’s own auth events.
    • readme.txt — standard WordPress plugin readme with description, requirements, installation steps, hook reference, and a short troubleshooting FAQ.

    Two filters and two actions for downstream customisation:

    • passkey_swpm_bridge_allow — veto the bridge for a specific user (e.g. force certain membership levels to use password login)
    • passkey_swpm_bridge_rememberme — set to false for a session-only SWPM cookie
    • passkey_swpm_bridge_after_bridge — fires on a successful bridge
    • passkey_swpm_bridge_no_match — fires when no SWPM member exists for that email (useful for auto-provisioning a default membership)

    I’m happy to send you a copy of the plugin–if you wanted to built a native bridge into Simple Membership. Or publish the plugin as a free Add-On.

    Thread Starter mengelsen

    (@mengelsen)

    Agreed.

    Claude Cowork offered-up (2) possible solutions for creating a bridge/integration between “Secure Passkey” and “Simple Membership”:

    Path A — Flip the default filter value from FALSE to TRUE

    Because Simple Membership is already listening on wp_login, the simplest possible integration is to tell Secure Passkeys to fire it. A single filter return value is enough.

    add_filter(
    'secure_passkeys_web_authn_validate_user_sign_in_enable_wp_login',
    '__return_true'
    );

    Path B — An Explicit Bridge between the two plugins

    If the site owner would rather not fire wp_login globally from the passkey flow, the same result can be achieved by hooking Secure Passkeys’s own custom action and calling the SWPM bridge directly. This is also the path to pick when there is non-trivial logic to run — for example, vetoing passkey logins for suspended Simple Membership accounts.

    add_action( 'secure_passkeys_web_authn_sign_in', function ( $user ) {
    if ( ! class_exists( 'SwpmAuth' ) ) { return; } // SWPM not loaded
    $swpm = SwpmAuth::get_instance();
    if ( $swpm->is_logged_in() ) { return; } // already bridged
    $swpm->login_to_swpm_using_wp_user( $user );
    }, 20, 1 );

    As for me, I’m leaning towards Path B. An in-depth Integration report can be found here.

    Thread Starter mengelsen

    (@mengelsen)

    The Simple Membership plugin supports content protection.
    When you log into WordPress using the Simple Membership login shortcode, the user can see content, based on their membership level.

    Currently, when the user logs in (using the “Login via Passkey” button) the user is authenticated to the site, but they are not able to view any of the protected content.

    Thread Starter mengelsen

    (@mengelsen)

    The Secure Passkey plugin does not support creating new user accounts. Instead, it only gives existing users the ability to add a passkey.

    That said, I did try turning ON “Enable Auto Create Member Accounts”. I then logged in as an existing WP Membership user (with a membership level that can access protected site content). I then added a passkey; logged out; then logged back in (using the “Login via Passkey” button). Once logged in, I was still unable to access protected content.

    (I can confirm that Force WP User Synchronization has always been enabled on my site.)

    Thread Starter mengelsen

    (@mengelsen)

    @mbrsolution The “Enable Auto Create Member Accounts” feature was not turned on. I toggled it on, but did not notice a difference in behavior.

    The passkey still works. The user is “logged in” (can access wp-admin to edit their profile), but they cannot access protected content.

    FYI: The test user that I’m adding a passkey to already exists, as WP Membership user.

    Thread Starter mengelsen

    (@mengelsen)

    Upon closer review. I think the “default page” is working as-intended.

    I just wish that the subscription settings (for registered users) were available via the front end (directly on the page), instead of redirecting the user to a WP Admin page.

    Thread Starter mengelsen

    (@mengelsen)

    I got it working. I just had to use the function exactly as it was written here: https://subscribe2.wordpress.com/support/faqs/#23

    Thread Starter mengelsen

    (@mengelsen)

    Will do! Thanks!

    Thread Starter mengelsen

    (@mengelsen)

    @qtwrk That’s correct. I access the CF7 form submissions via wp-admin.php.

    Thread Starter mengelsen

    (@mengelsen)

    Thanks @edo888. The [gtranslate] shortcode is working exactly the way I need/want it to! Thank you for the helpful suggestion.

    Thread Starter mengelsen

    (@mengelsen)

    I’m rocking WordPress v6.1.1

    Thread Starter mengelsen

    (@mengelsen)

    A premium ticket has been submitted. I accidentally uploaded a screenshot instead of the WP Security settings. 😛

    I’ll send the AIOWPS settings file as soon as the support team posts a status update to the ticket–which should trigger an email that will arrive in my Inbox.

    Modifying the function within wp-security-process-renamed-login-page.php is working (for the time being).

    Thread Starter mengelsen

    (@mengelsen)

    @hjogiupdraftplus: My test user is getting the confirmation email. (No problems there.) However, when they click the confirmation link, they are taken to a solid white page.

    However, when I replace wp-login.php string with the renamed login page string, the confirmation message successfully loads.

    Thread Starter mengelsen

    (@mengelsen)

    @hjogiupdraftplus I don’t fully understand what you want me to try. Can you provide me a set of instructions? Thanks!

Viewing 15 replies - 1 through 15 (of 21 total)