Rewrites controller registration to something more understandable.
This commit is contained in:
@@ -31,20 +31,14 @@ class WebAuthn
|
||||
*/
|
||||
public static function routes(): void
|
||||
{
|
||||
Route::middleware('web')->group(static function (): void {
|
||||
Route::post(
|
||||
'webauthn/register/options', [\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class, 'options'
|
||||
])->name('webauthn.register.options');
|
||||
Route::post(
|
||||
'webauthn/register', [\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class, 'register'
|
||||
])->name('webauthn.register');
|
||||
Route::middleware('web')
|
||||
->controller(\App\Http\Controllers\WebAuthn\WebAuthnRegisterController::class)
|
||||
->group(static function (): void {
|
||||
Route::post('webauthn/register/options', 'options')->name('webauthn.register.options');
|
||||
Route::post('webauthn/register', 'register')->name('webauthn.register');
|
||||
|
||||
Route::post(
|
||||
'webauthn/login/options', [\App\Http\Controllers\WebAuthn\WebAuthnLoginController::class, 'options'
|
||||
])->name('webauthn.login.options');
|
||||
Route::post(
|
||||
'webauthn/login', [\App\Http\Controllers\WebAuthn\WebAuthnLoginController::class, 'login'
|
||||
])->name('webauthn.login');
|
||||
Route::post('webauthn/login/options', 'options')->name('webauthn.login.options');
|
||||
Route::post('webauthn/login', 'login')->name('webauthn.login');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user