Skip to content

Commit 2de0034

Browse files
andrii-trushswilla
authored andcommitted
Update InviteAction.php
I pass Filament::getAuthPasswordBroker() to Password::broker() so the reset token is issued through the same password-broker configuration that Filament uses for its admin guard. This guarantees that the token is stored, validated, and later consumed in the correct context for Filament users rather than the default Laravel user broker.
1 parent 7e2d6b3 commit 2de0034

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Actions/InviteAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Filament\Actions\Action;
66
use Filament\Actions\Concerns\CanCustomizeProcess;
7+
use Filament\Facades\Filament;
78
use Illuminate\Contracts\Auth\MustVerifyEmail;
89
use Illuminate\Database\Eloquent\Model;
910
use Illuminate\Support\Facades\Notification;
@@ -38,7 +39,7 @@ protected function setUp(): void
3839

3940
$this->action(function (): void {
4041
$result = $this->process(static function (Model $user) {
41-
$token = Password::broker()->createToken($user);
42+
$token = Password::broker(Filament::getAuthPasswordBroker())->createToken($user);
4243

4344
// Use the method if the developer has specified one
4445
if (method_exists($user, 'sendPasswordSetNotification')) {

0 commit comments

Comments
 (0)