app/Providers/NovaServiceProvider.php
file.
Using Nova as Your Application’s Default Login
Sometimes you might want to use Nova as the default authentication UI for your application. To accomplish this, you should enable Nova’s authentication and password reset routes within theroutes
method of your application’s App\Providers\NovaServiceProvider
class:
Using Custom Authentication Routes
Alternatively, you can disable Nova’s authentication and password reset routes and instead provide Nova with your application’s own authentication route paths. This will instruct Nova where to redirect unauthenticated users:Enabling Two Factor Authentication
To allow your users to authenticate with two-factor authentication, you will need to update your application’sUser
model and App\Providers\NovaServiceProvider
service provider.
First, add the Laravel\Fortify\TwoFactorAuthenticatable
trait to your application’s User
model:
routes
method in your application’s App\Providers\NovaServiceProvider
class to enable two-factor authentication:
nova:publish
Artisan command to publish the required Fortify migrations. Then, run the migrate
command:
Enabling Email Verification
Nova also includes support for requiring email verification for newly registered users. To enable this feature, you should uncomment the relevant entry in thefeatures
configuration item in the fortify
method of your application’s App\Provider\NovaServiceProvider
class:
User
model implements the Illuminate\Contracts\Auth\MustVerifyEmail
interface:
Laravel\Nova\Http\Middleware\EnsureEmailIsVerified
middleware to the api_middleware
configuration key in your application’s config/nova.php
configuration file: