feat: Add Passkey support
- Added a button for logging in with Passkeys in `login.blade.php` - Refactored the `register` method and added the `login` method in `auth.js` - Made various modifications and additions to the passkey functionality in `PasskeysController.php` - Added event listener for login-passkey element in `app.js` - Modified the passkeys table schema and made modifications to `Passkey.php` - Changed the redirect route in the `login` method of `AuthController.php` - Made modifications and additions to the routes in `web.php` - Added `"web-auth/webauthn-lib": "^4.7"` to the list of required packages in `composer.json` - Changed the redirect URL in `AdminTest.php`
This commit is contained in:
parent
2fb8339d91
commit
03c8f20a8c
18 changed files with 982 additions and 363 deletions
|
@ -50,6 +50,8 @@ Route::group(['domain' => config('url.longurl')], function () {
|
|||
// The login routes to get auth’d for admin
|
||||
Route::get('login', [AuthController::class, 'showLogin'])->name('login');
|
||||
Route::post('login', [AuthController::class, 'login']);
|
||||
Route::get('login/passkey', [PasskeysController::class, 'getRequestOptions']);
|
||||
Route::post('login/passkey', [PasskeysController::class, 'login']);
|
||||
|
||||
// And the logout routes
|
||||
Route::get('logout', [AuthController::class, 'showLogout'])->name('logout');
|
||||
|
@ -146,8 +148,8 @@ Route::group(['domain' => config('url.longurl')], function () {
|
|||
// Passkeys
|
||||
Route::group(['prefix' => 'passkeys'], static function () {
|
||||
Route::get('/', [PasskeysController::class, 'index']);
|
||||
Route::post('save', [PasskeysController::class, 'save']);
|
||||
Route::get('/init', [PasskeysController::class, 'init']);
|
||||
Route::get('register', [PasskeysController::class, 'getCreateOptions']);
|
||||
Route::post('register', [PasskeysController::class, 'create']);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue