mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
fix oauth client secret
This commit is contained in:
@@ -6,7 +6,7 @@ use App\Filament\OptionsTrait;
|
||||
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;
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user