This repository demonstrates how to implement Passkey authentication in a Laravel application. Passkeys offer a secure, passwordless authentication mechanism that improves security and user experience.
- PHP >= 8.2
-
Clone the repository
git clone https://github.com/karan-darji/passkey-example.git cd passkey-example -
Install dependencies
composer install
-
Set up the database
- Update your .env file with the correct database credentials.
- Run the migrations:
php artisan migrate
- Install npm dependencies and compile assets
npm install && npm run dev
- Managing Passkeys:
- Users can add, remove, or manage their passkeys via the account profile page.
- Login with Passkey:
- Users can log in using their passkey instead of a traditional password.
-
Common Issues:
- Ensure your server is running on HTTPS, as WebAuthn requires secure communication.
- If you encounter issues with browser support, make sure you're using a compatible version.
-
Error Logs:
- Check the Laravel logs in storage/logs/laravel.log for any errors or issues.
The MIT License (MIT). Please see License File for more information.