password reset
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 17s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 22s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 52s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in -2s

This commit is contained in:
2026-01-29 19:41:07 -05:00
parent 4ee830327e
commit 8dbf3c22b6
5 changed files with 5 additions and 12 deletions

View File

@@ -11,8 +11,6 @@ use Siteworxpro\App\OAuth\Entities\Client;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question as QuestionInput;
abstract class Command extends \Symfony\Component\Console\Command\Command implements CommandInterface

View File

@@ -10,7 +10,6 @@ use Siteworxpro\App\CommandBus\Commands\SendPasswordReset;
use Siteworxpro\App\Services\Facades\CommandBus;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Question\Question as QuestionInput;
@@ -26,13 +25,7 @@ class ResetPassword extends Command
description: 'Send password reset email to the user'
);
}
/**
* @param ArgvInput|ClimateOutput $input
* @param ClimateOutput $output
* @return int
*/
public function __invoke(ClimateOutput|ArgvInput $input, ClimateOutput $output): int
public function __invoke($input, $output): int
{
$client = $this->askForClient($output, $input);

View File

@@ -48,7 +48,7 @@ class SendPasswordResetHandler extends CommandHandler
throw new CommandHandlerException('Failed to send password reset email.');
}
Redis::set('password_reset:' . $command->getUser()->id, $token, 3600);
Redis::set('password_reset:' . $command->getUser()->id, $token, 'EX', Redis::MINUTE * 15);
return $command->getUser();
}

View File

@@ -19,6 +19,6 @@
</style>
</head>
<body>
{{ content|raw }}
{% block body %}{% endblock %}
</body>
</html>

View File

@@ -23,6 +23,8 @@ use Siteworxpro\App\Services\Facade;
*/
class Redis extends Facade
{
public const MINUTE = 60;
/**
* Get the registered name of the component.
*