Skip to content

Commit 07b5f11

Browse files
[9.x] Warn about one-time-hashed-secret (#1259)
* Warn about one-time-hashed-secret * Update ClientCommand.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 03e4e51 commit 07b5f11

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Console/ClientCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Console\Command;
66
use Laravel\Passport\Client;
77
use Laravel\Passport\ClientRepository;
8+
use Laravel\Passport\Passport;
89

910
class ClientCommand extends Command
1011
{
@@ -161,6 +162,11 @@ protected function createAuthCodeClient(ClientRepository $clients)
161162
*/
162163
protected function outputClientDetails(Client $client)
163164
{
165+
if (Passport::$hashesClientSecrets) {
166+
$this->line('<comment>Here is your new client secret. This is the only time it will be shown so don\'t lose it!</comment>');
167+
$this->line('');
168+
}
169+
164170
$this->line('<comment>Client ID:</comment> '.$client->id);
165171
$this->line('<comment>Client secret:</comment> '.$client->plainSecret);
166172
}

0 commit comments

Comments
 (0)