=== Hari2014 Passkey Gate ===
Contributors: hari2014
Tags: passkey, webauthn, passwordless, login, security
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Passwordless login with passkeys (Face ID, Touch ID, Windows Hello, Android, security keys) for the WordPress login page.

== Description ==

Hari2014 Passkey Gate adds a "Sign in with passkey" button to the WordPress login form. Users register passkeys in their profile and then log in with a fingerprint, face or device PIN – no password needed.

* Works with renamed login URLs (e.g. All-In-One Security "Rename Login Page", WPS Hide Login)
* Passkey suggestions in the username field (autofill / conditional UI)
* Users add, rename and delete their passkeys in their profile
* Shortcodes: `[passkey_gate_login]` (login button on any page) and `[passkey_gate_manage]` (manage passkeys on the front end)
* WooCommerce: passkey button on the My Account login form and a "Passkeys" tab in My Account
* Passkey-only login per user role (users without a passkey are never locked out; emergency switch in wp-config.php)
* Admin overview of all passkeys (Users → Passkeys) with search, rename and bulk delete
* Login log with automatic deletion; IP addresses are stored only as salted hashes
* Security e-mail to the user when a new passkey is added
* Button text and colours, optional divider, setup reminder on the dashboard
* Outdated passkeys are removed from the device automatically via the WebAuthn Signal API (where supported)
* Pure PHP, no external libraries, no external services, no CDN
* Supports ES256, RS256 and EdDSA (if ext-sodium is available)
* Single-use challenges, sign-counter check, rate limiting, login-CSRF protection
* Password confirmation before adding a passkey (optional)
* GDPR: no biometric data is processed, privacy policy text, personal data export and erasure
* Clean uninstall: removes tables, options, user meta, transients and cron jobs

Passkeys require HTTPS.

== Installation ==

1. Upload the plugin and activate it.
2. Go to Users → Profile → Passkeys and click "Add passkey".
3. Log out – the login page now shows the passkey button.

== Frequently Asked Questions ==

= Which shortcodes are available? =
`[passkey_gate_login redirect="https://example.com/" divider="1"]` shows the passkey login button. `[passkey_gate_manage]` lets logged-in users manage their passkeys.

= I locked myself out with "passkey-only" roles. =
Add `define( 'PASSKEY_GATE_DISABLE_ENFORCEMENT', true );` to wp-config.php – password login works again.

= Does password login still work? =
Yes. Passkeys are offered in addition to passwords.

= I renamed my login URL. Does it still work? =
Yes. The button is added through WordPress hooks, and verification runs through admin-ajax.php.

= What happens when I delete the plugin? =
All passkeys, the login log and all settings are removed from the database. Users log in with their password again.

== Changelog ==

= 1.2.0 =
* Renamed to Hari2014 Passkey Gate.
* CSS is now added with wp_add_inline_style() on a registered handle.

= 1.1.0 =
* All features in one free plugin: shortcodes, WooCommerce, passkey-only roles, admin overview, login log, e-mail alerts and design options.
* Admin scripts are now enqueued files.

= 1.0.4 =
* Tested with WordPress 7.1.

= 1.0.3 =
* Tested with WordPress 7.0.

= 1.0.2 =
* Fix: "A request is already pending" on mobile when tapping the passkey button while autofill was active.
* Login options are prefetched so the passkey dialog opens directly after the tap (iOS).

= 1.0.1 =
* Outdated passkeys (deleted on the site but still on the device) are removed from the device automatically via the WebAuthn Signal API where supported.
* Clear messages for outdated passkeys and for "already registered on this device".
* Each passkey gets a distinguishable account label (login + passkey name).
* Failed registrations are logged (Pro).

= 1.0.0 =
* Initial release.
