Page MenuHomePhorge

D5631.1775232031.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5631.1775232031.diff

diff --git a/src/app/Console/Commands/Data/InitCommand.php b/src/app/Console/Commands/Data/InitCommand.php
--- a/src/app/Console/Commands/Data/InitCommand.php
+++ b/src/app/Console/Commands/Data/InitCommand.php
@@ -138,7 +138,8 @@
// Inject extra passport clients
if (!empty(\config('auth.extra_passport_clients'))) {
foreach (\config('auth.extra_passport_clients') as $clientConfig) {
- if (!Passport::client()->where('id', $clientConfig['id'])->exists()) {
+ $client = Passport::client()->where('id', $clientConfig['id'])->first();
+ if (!$client) {
\Log::info("Creating client " . $clientConfig['id']);
$client = Passport::client()->forceFill([
'user_id' => null,
@@ -152,8 +153,15 @@
'allowed_scopes' => $clientConfig['allowed_scopes'],
]);
$client->id = $clientConfig['id'];
- $client->save();
+ } else {
+ $client->revoked = $clientConfig['revoked'];
+ $client->allowed_scopes = $clientConfig['allowed_scopes'];
+ $client->redirect = $clientConfig['redirect'];
+ $client->secret = $clientConfig['secret'];
+ $client->name = $clientConfig['name'];
+ $client->provider = $clientConfig['provider'];
}
+ $client->save();
}
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 4:00 PM (19 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18824618
Default Alt Text
D5631.1775232031.diff (1 KB)

Event Timeline