PHPackages                             jampire/moonshine-passkeys - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. jampire/moonshine-passkeys

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

jampire/moonshine-passkeys
==========================

Biometric Authentication for MoonShine Admin Panel

v0.1.2(2mo ago)53[1 PRs](https://github.com/Jampire/moonshine-passkeys/pulls)MITPHPPHP ^8.2CI passing

Since Apr 4Pushed 2mo agoCompare

[ Source](https://github.com/Jampire/moonshine-passkeys)[ Packagist](https://packagist.org/packages/jampire/moonshine-passkeys)[ Docs](https://github.com/Jampire/moonshine-passkeys)[ RSS](/packages/jampire-moonshine-passkeys/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (12)Versions (6)Used By (0)

 [![build](https://github.com/Jampire/moonshine-passkeys/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/Jampire/moonshine-passkeys/actions/workflows/build.yml "build") [![downloads](https://camo.githubusercontent.com/f779997514b6759e4bf7d37ac0cb5218a28f537b14b5bd9b1e90c59bfbfa1f72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a616d706972652f6d6f6f6e7368696e652d706173736b6579733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Jampire/moonshine-passkeys "downloads") [![license](https://camo.githubusercontent.com/06b6e95581e4860dbcbf11761e093851535ca074cdac066966843bf6be9157cb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4a616d706972652f6d6f6f6e7368696e652d706173736b6579733f7374796c653d666c61742d737175617265)](https://github.com/Jampire/moonshine-passkeys/blob/master/LICENSE "license") [![release](https://camo.githubusercontent.com/e2cc320bb5545d059613b8154031b75c6a8db8e96009314f9f7201fba7eb0251/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4a616d706972652f6d6f6f6e7368696e652d706173736b6579733f646973706c61795f6e616d653d74616726736f72743d73656d766572267374796c653d666c61742d737175617265)](https://github.com/Jampire/moonshine-passkeys/releases "release") [![composer](https://camo.githubusercontent.com/3d97616e36ecb3e341ed5f53975bdfa56a434a861652f7364ae811f2b10f3872/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f4a616d706972652f6d6f6f6e7368696e652d706173736b6579733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Jampire/moonshine-passkeys "php") [![contributors](https://camo.githubusercontent.com/d1ce3c769a31512be41fec9bba782604c6fd2eeac4b75a07d0d08b9282dc9ce6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4a616d706972652f6d6f6f6e7368696e652d706173736b6579733f7374796c653d666c61742d737175617265)](https://github.com/Jampire/moonshine-passkeys/graphs/contributors "contributors") [![contributors](https://camo.githubusercontent.com/91c42c04138c5a5891478fd36f9aa0f199617c03c14dd7191989934dafd50c10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/Jampire/moonshine-passkeys/issues "welcome")

Biometrics (Passkeys) for MoonShine Admin Panel
===============================================

[](#biometrics-passkeys-for-moonshine-admin-panel)

Introduction
------------

[](#introduction)

This package provides Biometric authentication and authorization for [MoonShine](https://getmoonshine.app/) admin panel. It's based on [Passkeys](https://en.wikipedia.org/wiki/WebAuthn) technology using [WebAuthn](https://www.w3.org/TR/webauthn-3/) protocol. Biometrics allows to login to the admin panel using such technologies as Apple FaceID, Apple TouchID, Android Fingerprint, Windows Hello, Password Managers with Passkey support, etc.

Pre-requirements
----------------

[](#pre-requirements)

Your admin panel should use HTTPS scheme only. Even the localhost.

Installation
------------

[](#installation)

Use `composer` to install `MoonShine Passkeys` package:

```
composer require jampire/moonshine-passkeys --with-all-dependencies
php artisan migrate
```

Publish a config file:

```
php artisan vendor:publish --provider="Jampire\MoonshinePasskeys\PasskeyServiceProvider" --tag=config
```

This package is designed to work in MoonShine only. You first need to install it. Please read the [documentation](https://getmoonshine.app/en/docs/4.x/installation) on how to install and configure MoonShine.

Compatibility
-------------

[](#compatibility)

MoonShineMoonShine PasskeysCurrently supported&gt;= v4.0&gt;= v0.1yesConfiguration
-------------

[](#configuration)

*Auto-installer is coming soon...*

The most critical config option is `passkeys.rp_id`. It should match the base URL your Admin Panel is running on.

Passkeys are working with MoonShine User model. It should implement [`Jampire\MoonshinePasskeys\Models\Contracts\PasskeyContract`](src/Models/Contracts/PasskeyContract.php) interface.

- If you are already using the custom MoonShine User model, you need just to add PasskeyContract interface and [`Jampire\MoonshinePasskeys\Models\Concerns\HasPasskeys`](src/Models/Concerns/HasPasskeys.php) trait to your model.
- If you are using default MoonShine User model, you need to create new model that extends MoonShine User model, and implement PasskeyContract interface:

```
