From 7069c66f1bd0840a3b6cb866c08e83049901ff7c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 8 May 2020 12:50:40 +0200 Subject: [PATCH 1/2] Warn about one-time-hashed-secret --- src/Console/ClientCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Console/ClientCommand.php b/src/Console/ClientCommand.php index f51a6b08f..3cf847dc9 100644 --- a/src/Console/ClientCommand.php +++ b/src/Console/ClientCommand.php @@ -5,6 +5,7 @@ use Illuminate\Console\Command; use Laravel\Passport\Client; use Laravel\Passport\ClientRepository; +use Laravel\Passport\Passport; class ClientCommand extends Command { @@ -161,6 +162,10 @@ protected function createAuthCodeClient(ClientRepository $clients) */ protected function outputClientDetails(Client $client) { + if (Passport::$hashesClientSecrets) { + $this->line('Here is your new client secret. This is the only time it will be shown so don\'t lose it!'); + } + $this->line('Client ID: '.$client->id); $this->line('Client secret: '.$client->plainSecret); } From 1e1871c12b118afe6256e3b5e504fe41b587230d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 8 May 2020 08:49:22 -0500 Subject: [PATCH 2/2] Update ClientCommand.php --- src/Console/ClientCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Console/ClientCommand.php b/src/Console/ClientCommand.php index 3cf847dc9..f645cf613 100644 --- a/src/Console/ClientCommand.php +++ b/src/Console/ClientCommand.php @@ -164,6 +164,7 @@ protected function outputClientDetails(Client $client) { if (Passport::$hashesClientSecrets) { $this->line('Here is your new client secret. This is the only time it will be shown so don\'t lose it!'); + $this->line(''); } $this->line('Client ID: '.$client->id);