Skip to content

Frontend Account Security

Frontend Account Security lets logged-in users manage their own security settings from normal site pages. It is handy for member dashboards, client portals, WooCommerce-style account areas, and block themes where users should not need to visit /wp-admin/profile.php.

Available Frontend Surfaces

Guard Dog includes separate primitives plus one composite widget:

Surface Shortcode Block
Full account security widget [guard_dog_account_security] Guard Dog Account Security
Two-factor authentication [guard_dog_two_factor] Guard Dog Two-Factor Auth
Passkey management [guard_dog_passkeys] Guard Dog Passkeys
Active session management [guard_dog_sessions] Guard Dog Sessions
Legacy account security alias [guard_dog_2fa] Not recommended for new pages

The legacy [guard_dog_2fa] shortcode still works, but new templates should use the clearer shortcodes above.

Full Account Security Widget

Use the composite widget when you want one account page to show multiple security tools:

[guard_dog_account_security]

By default, it shows 2FA and passkeys. Sessions are opt-in:

[guard_dog_account_security show_2fa="true" show_passkeys="true" show_sessions="true"]

Hide sections per page when you want a slimmer layout:

[guard_dog_account_security show_2fa="false" show_passkeys="true" show_sessions="true"]

Standalone 2FA Management

Use this when an account page should only show 2FA setup and recovery-code controls:

[guard_dog_two_factor style="default"]

The matching block is Guard Dog Two-Factor Auth.

Users can enable app-based 2FA, enable email-based 2FA when available, disable 2FA, regenerate recovery codes, and copy recovery codes after setup.

Standalone Passkey Management

Use this when users should register, rename, or remove passkeys from the frontend:

[guard_dog_passkeys style="default"]

The matching block is Guard Dog Passkeys.

Passkey management only renders when Passkeys are enabled globally. Logged-out visitors see a login-required message.

Standalone Session Management

Use this when users should review active devices and terminate old sessions:

[guard_dog_sessions style="default"]

The matching block is Guard Dog Sessions.

Session management only renders when Session Management is enabled globally. Each instance uses unique IDs, so multiple session/account modules can safely appear on one page.

Styles

Most frontend account surfaces support:

  • default
  • minimal
  • compact

Example:

[guard_dog_account_security style="compact" show_sessions="true"]

Visibility Rules

Frontend account security surfaces are for logged-in users.

  • Logged-out visitors receive a login-required message.
  • Disabled global features do not render their related controls.
  • Passkey management only appears when Passkeys are enabled.
  • Session management only appears when Session Management is enabled.
  • Email 2FA controls only appear when email 2FA is enabled and available.

Suggested Account Page Layouts

Simple Member Account

[guard_dog_account_security show_2fa="true" show_passkeys="true" show_sessions="false"]

Good for ordinary member sites where users need setup controls without a full device table.

Security Center

[guard_dog_account_security show_2fa="true" show_passkeys="true" show_sessions="true"]

Good for higher-value accounts where users should be able to review active devices.

Separate Dashboard Panels

[guard_dog_two_factor]
[guard_dog_passkeys]
[guard_dog_sessions]

Good when your theme or page builder has its own cards, tabs, or columns.

Admin Setup Checklist

  1. Enable the global features you want users to manage.
  2. Create or edit the account/security page.
  3. Add the shortcode or block.
  4. Test as a logged-out visitor.
  5. Test as a regular logged-in user.
  6. Test the specific actions you expose, such as registering a passkey or terminating a session.

Troubleshooting

A section is missing

Check the related global feature. For example, Passkeys must be enabled before passkey management appears.

Session controls do not show

Make sure Session Management is enabled in Guard Dog -> Sessions -> Settings and that the current visitor is logged in.

Email 2FA controls do not show

Make sure email 2FA is enabled and your email provider is configured. See Email Provider Configuration.

Styling looks cramped

Try style="minimal" or style="compact" depending on the surrounding layout. If a theme has narrow columns, keep security widgets in a full-width account area when possible.


← Frontend Login Form | Documentation Home | Passkeys →