Skip to content

Commit 053e391

Browse files
authored
feat: add LoginViaRemember subscribe method (#484)
1 parent 4b154e1 commit 053e391

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Listeners/LoginViaRemember.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Auth\Events\Login;
66
use Illuminate\Contracts\Auth\Authenticatable as User;
7+
use Illuminate\Events\Dispatcher;
78
use Illuminate\Support\Facades\Auth;
89
use LaravelWebauthn\Facades\Webauthn;
910

@@ -28,4 +29,16 @@ private function registerWebauthn(User $user)
2829
Webauthn::login($user);
2930
}
3031
}
32+
33+
/**
34+
* Register the listeners for the subscriber.
35+
*
36+
* @return array<string, string>
37+
*/
38+
public function subscribe(Dispatcher $events): array
39+
{
40+
return [
41+
Login::class => 'handle',
42+
];
43+
}
3144
}

0 commit comments

Comments
 (0)