Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117766200
D5631.1775232031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5631.1775232031.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5631: Support updating the passport client
Attached
Detach File
Event Timeline