| 开发者 | endisha |
|---|---|
| 更新时间 | 2026年1月31日 03:50 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
After activating the plugin, a "Secure Passkeys" menu item will appear in your WordPress admin dashboard's sidebar.
You can add a custom theme for frontend shortcodes using the secure_passkeys_themes and secure_passkeys_themes_paths filters.
Register the Theme: Use the secure_passkeys_themes filter to register your new theme and make it available in the plugin settings.
`
<?php
add_filter('secure_passkeys_themes', function ($themes)
{
$themes['new_theme'] = 'New Theme';
return $themes;
}, 10, 1);
`
Specify the Theme Path: Use the secure_passkeys_themes_paths filter to define the file path to your custom theme's directory.
`
<?php
add_filter('secure_passkeys_themes_paths', function ($themes)
{
$themes['new_theme'] = 'your/path/new/theme/folder';
return $themes;
}, 10, 1);
`
Override Template Files: Copy the template files you wish to customize from secure-passkeys/src/views/frontend/default/ to your custom theme's folder (your/path/to/new/theme/folder). Any files not copied to your custom theme folder will be loaded from the plugin's default theme, providing a fallback mechanism. This allows you to customize only the files you need to change.
Yes, you can redirect users after a passkey login by using the secure_passkeys_login_redirect_url filter. You can add the following code snippets to your theme's functions.php file.
Example – Redirect to a Specific URL:
This example redirects all users to a specific URL after they log in.
`
<?php
add_filter('secure_passkeys_login_redirect_url', function ($redirect_to) {
// Redirect users to a custom URL after logging in with a passkey
return 'https://your-domain.com/your-custom-path';
});
`
Example – Redirect Based on User Role:
This example redirects users based on their assigned role.
`
<?php
add_filter('secure_passkeys_login_redirect_url', function ($redirect_to) {
$user = wp_get_current_user();
// Redirect administrators to the WP admin dashboard
if (in_array('administrator', $user->roles)) {
return admin_url();
}
// Redirect subscribers to a custom dashboard page
if (in_array('subscriber', $user->roles)) {
return home_url('/dashboard');
}
// Default fallback URL
return $redirect_to;
});
`
Yes! The plugin offers a variety of filters and actions that allow developers to customize and extend its functionality. If you're a developer, we encourage you to explore these hooks and tailor the plugin to meet your specific needs. For a complete list of available hooks and examples, refer to the plugin’s codebase.
Heimlane Vault authenticator with its AAGUID.AliasVault authenticator with its AAGUID.iCloud Keychain entry to Apple Passwords with new icon.initial authenticator with its AAGUID.wpdb::prepare() on static database queries.HTTP_REFERER.extra_wrapper_classes and extra_button_classes attributes to the [secure_passkeys_login_form] shortcode for easier CSS customization.used_at timestamp for a challenge was not being updated correctly in the database.Accept-Encoding header from the fingerprint calculation to prevent potential validation errors.is_active property on log records.This is the initial release of the Secure Passkeys plugin.
Secure Passkeys is licensed under the GNU General Public License v2 or later.