1. Go to this page and download the library: Download wpconsulting/passkey-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wpconsulting / passkey-bundle example snippets
use WpConsulting\PasskeyBundle\Contract\PasskeyUserInterface;
class User implements UserInterface, PasswordAuthenticatedUserInterface, PasskeyUserInterface
{
public function getUserId(): mixed
{
return $this->id;
}
public function getUserName(): ?string
{
return $this->email;
}
public function getUserDisplayName(): string
{
return (string) $this->getUserName();
}
}
bash
# Examples
php bin/console passkey:configure --user-class=App\\Entity\\User
php bin/console passkey:configure --no-db
php bin/console passkey:configure -n # non-interactive if user_class is already in YAML