Download the PHP package pioneer-dynamics/laravel-passkey without Composer
On this page you can find all versions of the php package pioneer-dynamics/laravel-passkey. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pioneer-dynamics/laravel-passkey
More information about pioneer-dynamics/laravel-passkey
Files in pioneer-dynamics/laravel-passkey
Package laravel-passkey
Short Description Easy Passkey integration for Laravel
License MIT
Informations about the package laravel-passkey
Laravel Passkeys
Easy Passkey integration for Laravel
Click the thumbnail below to see a video of the package in action.:
Thank You
The core of the project uses svgta/webauthn library.
We are looking for contributors
We are looking for contributors to help improve the library and add compatibility for Livewire.
ALERT
!!!WARNING!!! The command
passkey:install
command must be run ONLY on development and ONLY ONCE. Depending on the options provided, this command will publish the below files and modify them to suit your needs. Please find the details below.
- Config file, if
--config
parameter is provided - Migration file
- Jetstream flavoured Inertia JS component files, if
--jetstream-inertia
is provided.
!!WARNING!! Any existing files will be replaced.
Installation
You have two ways to run setup - 1, the Setup command in step #2 (below) or 2, the
vendor:publish
command. I recommend thepasskey:install
command since it takes care of replacing some placeholders in the published files apart from publishing them. Use the--table
and--username
flags to change the defaults. These values default tousers
andvendor:publish
command you'll need to replace__USERNAME__
,__TABLE__
,__USERNAME_LABEL__
and the__USERNAME_TYPE__
placeholders manually. These placeholders can be found in thejs/Components/ConfirmsPasswordOrPasskey.vue
,js/Components/ConfirmsPasskey.vue
,js/Pages/Auth/LoginWithPasskey.vue
and theconfig/passkey.php
files.
-
Require the library
composer install pioneer-dynamics/laravel-passkey
-
Run the setup
Before running this command, run
php artisan passkey:install --help
to see understand all options.php artisan passkey:install
This will publish the config files, migrations and some Jetstream-Inertia flavoured vue files. It will also replace some contents of these published files.
-
Run the migrations
php artisan migrate
-
Implement the
PasskeyUser
interface to you user model and add theHasPasskeys
trait -
If you are using Laravel Jetstream with InertiaJS, you can can add the below to the
FortifyServiceProvider
'sboot()
command in order to override the default Login Vue and use the one provided by this package. -
Replace the
<ConfirmsPassword/>
component with<ConfirmsPasswordOrPasskey/>
component whereever<ConfirmsPassword/>
is used. The`<ConfirmsPasswordOrPasskey/>
optionally accepts a:seconds
property which defines how long a validation should be valid for. Should you chose to use it, there should also be a correspondingpassword.confirm
middleware for the route. -
Add
<PasskeyForm/>
fromresources/js/Pages/Profile/Partials/PassKeyForm.vue
toresources/js/Pages/Profile/Show.vue
. This is where users will manage their passkeys. -
If using Jetstream-InertiaJS the below packages are needed are installed automatically if the command was called with the
--jetstream-inertia
option.- npm i luxon
- npm i @simplewebauthn/browser
Issues
Feel free to raise any Issue here.
Licence
The MIT License (MIT) Copyright © Mathew Paret
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
All versions of laravel-passkey with dependencies
laravel/framework Version ^10.10 || ^11.0
symfony/clock Version ^6.3 || ^7.0