hoang79/passkeyauth
Composer 安装命令:
composer require hoang79/passkeyauth
包简介
Passkey for Laravel 11
README 文档
README
English version below.
Voraussetzungen
- PHP [8.2]
- Laravel [11]
- Livewire [3.0]
- Jetstream [5.1]
- Datenbank (erste Migration bereits ausgeführt)
Einführung
Dieses Paket ermöglicht die Verwendung von Passkeys zur Authentifizierung in Laravel 11 Anwendungen. Passkeys sind eine benutzerfreundliche und sichere Alternative zu herkömmlichen Passwörtern. Sie können auf Mobilgeräten und in Passwortmanagern gespeichert werden und ermöglichen eine bequeme und sichere Anmeldung ohne Passwort.
Vorteile von Passkeys
- Benutzerfreundlichkeit: Kein Bedarf mehr, sich komplexe Passwörter zu merken.
- Sicherheit: Verhindert Phishing-Angriffe und Passwortdiebstahl.
- Kompatibilität: Funktioniert mit gängigen Passwortmanagern und mobilen Geräten.
Installationsanleitung
Paket installieren
-
Fügen Sie das Paket zu Ihrem Laravel-Projekt hinzu:
composer require hoang79/passkeyauth
-
Führen Sie den Passkey-Installer aus, um die notwendigen Anpassungen vorzunehmen:
php artisan passkey:install
Manuelle Anpassungen
-
Bearbeiten Sie die
.envDatei:- Stellen Sie sicher, dass bei der
APP_URLkeinhttp(s)://steht, sondern nur die Domain. Zum Beispiel:
APP_URL=laravel-passkey3.test
- Stellen Sie sicher, dass bei der
-
Passen Sie den Redirect bei der folgenden Zeile in
config/fortify.phpan:'home' => '/dashboard',
-
Passen Sie die Mail-Einstellungen in der
.envDatei an, damit der OTP-Code versendet werden kann:MAIL_MAILER=smtp MAIL_HOST=127.0.0.1 MAIL_PORT=2525 MAIL_USERNAME="${APP_NAME}" MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="${APP_NAME}"
-
Stellen Sie sicher, dass die notwendigen Migrationen ausgeführt wurden:
php artisan migrate
Nutzung
Nach der Installation und den notwendigen Anpassungen können Benutzer sich mit Passkeys registrieren und anmelden. Die Registrierung erfolgt über die Eingabe einer E-Mail-Adresse und das Erhalten eines OTP (One Time Password), gefolgt von der Speicherung des Passkeys.
Die Anmeldung erfolgt ebenfalls über die Eingabe der E-Mail-Adresse und das Verwenden des gespeicherten Passkeys.
Zukünftige Features
- OTP nochmals versenden
- Mit Mobilnummer und SMS anmelden
Weitere Informationen
Weitere Informationen zu Passkeys und deren Verwendung finden Sie in der offiziellen Dokumentation zu WebAuthn und den Passkey-Standards.
Laravel 11 Passkey Authentication
Requirements
- PHP [8.2]
- Laravel [11]
- Livewire [3.0]
- Jetstream [5.1]
- Database (initial migration already run)
Introduction
This package enables the use of passkeys for authentication in Laravel 11 applications. Passkeys are a user-friendly and secure alternative to traditional passwords. They can be stored on mobile devices and password managers, allowing for convenient and secure passwordless login.
Benefits of Passkeys
- User-Friendly: No need to remember complex passwords.
- Security: Prevents phishing attacks and password theft.
- Compatibility: Works with popular password managers and mobile devices.
Installation Guide
Install the Package
-
Add the package to your Laravel project:
composer require hoang79/passkeyauth
-
Run the Passkey installer to make the necessary adjustments:
php artisan passkey:install
Manual Adjustments
-
Edit the
.envfile:- Ensure that the
APP_URLdoes not containhttp(s)://, only the domain. For example:
APP_URL=laravel-passkey3.test
- Ensure that the
-
Adjust the redirect in
config/fortify.php:'home' => '/dashboard',
-
Update the mail settings in the
.envfile to enable OTP code sending:MAIL_MAILER=smtp MAIL_HOST=127.0.0.1 MAIL_PORT=2525 MAIL_USERNAME="${APP_NAME}" MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="${APP_NAME}"
-
Ensure the necessary migrations have been executed:
php artisan migrate
Usage
After installation and necessary adjustments, users can register and log in using passkeys. Registration involves entering an email address, receiving a One Time Password (OTP), and saving the passkey.
Logging in involves entering the email address and using the saved passkey.
Future Features
- Resend OTP
- Sign in with mobile number and SMS
Further Information
For more information on passkeys and their use, refer to the official WebAuthn documentation and passkey standards.
License
This package is licensed under the MIT License. For more details, see the LICENSE file.
hoang79/passkeyauth 适用场景与选型建议
hoang79/passkeyauth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 50 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 07 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 hoang79/passkeyauth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hoang79/passkeyauth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-19