Skip to content

Commit

Permalink
fix oauth client secret
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Mar 17, 2024
1 parent 3e96d18 commit 73bd3a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Filament/Resources/Oauth/ClientResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Filament\PageListSingle;
use App\Filament\Resources\Oauth\ClientResource\Pages;
use App\Filament\Resources\Oauth\ClientResource\RelationManagers;
use Laravel\Passport\Client;
use App\Models\OauthClient;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
Expand All @@ -19,7 +19,7 @@ class ClientResource extends Resource
{
use OptionsTrait;

protected static ?string $model = Client::class;
protected static ?string $model = OauthClient::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';

Expand Down
7 changes: 7 additions & 0 deletions app/Models/OauthClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

namespace App\Models;

use Illuminate\Support\Str;
use Laravel\Passport\Client;

class OauthClient extends Client
{
protected static function booted(): void
{
static::creating(function (OauthClient $model) {
$model->secret = Str::random(40);
});
}
public function skipsAuthorization(): bool
{
return (bool)$this->skips_authorization;
Expand Down
2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-17');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-18');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
Expand Down

0 comments on commit 73bd3a1

Please sign in to comment.