Download the PHP package xefi/laravel-passkey-api without Composer

On this page you can find all versions of the php package xefi/laravel-passkey-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-passkey-api

Laravel Passkey

Latest Version on Packagist Tests

A Laravel package for passkey (WebAuthn/FIDO2) authentication — register and verify passkeys through a clean REST API, with a swappable authentication action to support Sanctum, Passport, web sessions, or any custom guard.

Full documentation at laravel-passkey.xefi.com.


Requirements


Installation

Add the HasPasskeys trait to your User model:


Configuration

Key options in config/passkey.php:

Key Default Description
enabled true Enable / disable the package
timeout 60000 WebAuthn operation timeout (ms)
challenge_length 32 Challenge size in bytes
user_model App\Models\User Authenticatable model
session_guard null Guard used by CreateWebSessionAction (falls back to Laravel default guard)
auth_action CreateWebSessionAction Action invoked on successful login

Authentication Actions

The login endpoint delegates to a swappable action class. Three are provided out of the box:

You can also bind your own implementation of Xefi\LaravelPasskey\Contracts\PasskeyAuthAction.


API Endpoints

Passkey Management (requires authentication)

Method Endpoint Description
GET /api/passkeys List passkeys for the authenticated user
POST /api/passkeys/register/options Get registration options
POST /api/passkeys/register Register a new passkey

Authentication (public)

Method Endpoint Description
POST /api/passkeys/verify/options Get verification options
POST /api/passkeys/verify Verify a passkey (MFA / re-auth)
POST /api/passkeys/login Authenticate and invoke the auth action

Full request/response schemas are available in the documentation.


Typical Flow


Support us

Since 1997, XEFI is a leader in IT performance support for small and medium-sized businesses through its nearly 200 local agencies based in France, Belgium, Switzerland and Spain. A one-stop shop for IT, office automation, software, digitalization, print and cloud needs. Want to work with us?


License

MIT — see LICENSE.


All versions of laravel-passkey-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0|^13.0
spomky-labs/cbor-php Version ^3.0
web-auth/cose-lib Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xefi/laravel-passkey-api contains the following files

Loading the files please wait ...