|
| 1 | +<?php |
| 2 | + |
| 3 | +use App\Models\Passkey; |
| 4 | +use App\Models\User; |
| 5 | +use Spatie\LaravelPasskeys\Actions\ConfigureCeremonyStepManagerFactoryAction; |
| 6 | +use Spatie\LaravelPasskeys\Actions\FindPasskeyToAuthenticateAction; |
| 7 | +use Spatie\LaravelPasskeys\Actions\GeneratePasskeyAuthenticationOptionsAction; |
| 8 | +use Spatie\LaravelPasskeys\Actions\GeneratePasskeyRegisterOptionsAction; |
| 9 | +use Spatie\LaravelPasskeys\Actions\StorePasskeyAction; |
| 10 | + |
| 11 | +return [ |
| 12 | + /* |
| 13 | + * After a successful authentication attempt using a passkey |
| 14 | + * we'll redirect to this URL. |
| 15 | + */ |
| 16 | + 'redirect_to_after_login' => '/dashboard', |
| 17 | + |
| 18 | + /* |
| 19 | + * These class are responsible for performing core tasks regarding passkeys. |
| 20 | + * You can customize them by creating a class that extends the default, and |
| 21 | + * by specifying your custom class name here. |
| 22 | + */ |
| 23 | + 'actions' => [ |
| 24 | + 'generate_passkey_register_options' => GeneratePasskeyRegisterOptionsAction::class, |
| 25 | + 'store_passkey' => StorePasskeyAction::class, |
| 26 | + 'generate_passkey_authentication_options' => GeneratePasskeyAuthenticationOptionsAction::class, |
| 27 | + 'find_passkey' => FindPasskeyToAuthenticateAction::class, |
| 28 | + 'configure_ceremony_step_manager_factory' => ConfigureCeremonyStepManagerFactoryAction::class, |
| 29 | + ], |
| 30 | + |
| 31 | + /* |
| 32 | + * These properties will be used to generate the passkey. |
| 33 | + */ |
| 34 | + 'relying_party' => [ |
| 35 | + 'name' => config('app.name'), |
| 36 | + 'id' => parse_url(config('app.url'), PHP_URL_HOST), |
| 37 | + 'icon' => null, |
| 38 | + ], |
| 39 | + |
| 40 | + /* |
| 41 | + * The models used by the package. |
| 42 | + * |
| 43 | + * You can override this by specifying your own models |
| 44 | + */ |
| 45 | + 'models' => [ |
| 46 | + 'passkey' => Passkey::class, |
| 47 | + 'authenticatable' => env('AUTH_MODEL', User::class), |
| 48 | + ], |
| 49 | +]; |
0 commit comments