# Custom authentication If you do not use the `laravel-admin` built-in authentication login logic, you can refer to the following way to customize the login authentication logic. First of all, you need define a `User provider`, used to obtain the user identity, such as `app/Providers/CustomUserProvider.php`: ```php registerPolicies(); Auth::provider('custom', function ($app, array $config) { // Return an instance of Illuminate\Contracts\Auth\UserProvider... return new CustomUserProvider(); }); } } ``` Finally modify the configuration, open `config/admin.php`, find the `auth` part: ```php 'auth' => [ 'guards' => [ 'admin' => [ 'driver' => 'session', 'provider' => 'admin', ] ], // Modify the following 'providers' => [ 'admin' => [ 'driver' => 'custom', ] ], ], ``` This completes the logic of custom authentication.