Skip to content

Commit 42348ec

Browse files
authored
🐛 Fix bug on reset password mail (#125)
1 parent 34b6844 commit 42348ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: app/Providers/AuthServiceProvider.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ public function boot(): void
3737
{
3838
$this->registerPolicies();
3939

40-
ResetPassword::createUrlUsing(fn ($user, string $token) => config('lcm.spa_url').'/auth/password/reset?token='.$token);
40+
if (request()->ajax()) {
41+
ResetPassword::createUrlUsing(
42+
callback: fn ($user, string $token) => config('lcm.spa_url').'/auth/password/reset?token='.$token
43+
);
44+
}
4145

4246
Gate::before(fn ($user) => $user->hasRole('admin') ? true : null);
4347
}

0 commit comments

Comments
 (0)