Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jacouser's avatar

Method Illuminate\Auth\RequestGuard::login does not exist.

on submitting reset password on nova form I'm getting this error, I'm copying the auth config and you can see there is no login guard anywhere. any ideas of the issue

'defaults' => [ 'guard' => 'students', 'passwords' => 'users', ],

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'students' => [
        'driver' => 'students',
        'provider' => 'students',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
        'hash' => false,
    ],
],

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\User::class,
    ],

    'students' => [
        'driver' => 'eloquent',
        'model' => App\Student::class,
    ]
],

'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'password_resets',
        'expire' => 60,
    ],
],
0 likes
2 replies
bobbybouwmann's avatar

Did you create a custom Authentication guard called students? It seems that you need this config instead

'guards' => [
    // Other guards

    'students' => [
        'driver' => 'session', // I changed this back to "session"
        'provider' => 'students',
    ],
],

This works if you only added the students provider ;)

jacouser's avatar

Hi, thanks for your reply, it's defined on AuthServideProvider.php Auth::viaRequest('students', function (Request $request) { ... also the one it says it doesnt find is login and not students, and also only have this issue on reset password submit form on nova. any ideas?

Please or to participate in this conversation.