diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index cc22227e..22361aea 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -41,7 +41,6 @@ class Kernel extends HttpKernel ], 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], diff --git a/app/Models/User.php b/app/Models/User.php index 219e4b7f..55aea29c 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -9,7 +9,6 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Support\Collection; use Laravel\Fortify\TwoFactorAuthenticatable; -use Laravel\Sanctum\HasApiTokens; /** * @property int $id @@ -34,7 +33,6 @@ */ class User extends Authenticatable { - use HasApiTokens; use HasFactory; use Notifiable; use TwoFactorAuthenticatable; diff --git a/composer.json b/composer.json index babeb092..11a9c075 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "guzzlehttp/guzzle": "^7.2", "laravel/fortify": "^1.17", "laravel/framework": "^10.0", - "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "opcodesio/log-viewer": "^3.0", "phpseclib/phpseclib": "~3.0" diff --git a/composer.lock b/composer.lock index 0ab746c4..5b40b0d1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0b2677968e2517591773c88a9b77a5fe", + "content-hash": "b6cdd41bcbee6c7e396c589e033eb880", "packages": [ { "name": "aws/aws-crt-php", @@ -1775,72 +1775,6 @@ }, "time": "2024-02-21T19:25:27+00:00" }, - { - "name": "laravel/sanctum", - "version": "v3.3.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/sanctum.git", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5", - "shasum": "" - }, - "require": { - "ext-json": "*", - "illuminate/console": "^9.21|^10.0", - "illuminate/contracts": "^9.21|^10.0", - "illuminate/database": "^9.21|^10.0", - "illuminate/support": "^9.21|^10.0", - "php": "^8.0.2" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^7.28.2|^8.8.3", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Sanctum\\SanctumServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Sanctum\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", - "keywords": [ - "auth", - "laravel", - "sanctum" - ], - "support": { - "issues": "https://github.com/laravel/sanctum/issues", - "source": "https://github.com/laravel/sanctum" - }, - "time": "2023-12-19T18:44:48+00:00" - }, { "name": "laravel/serializable-closure", "version": "v1.3.3", diff --git a/config/cors.php b/config/cors.php index 8a39e6da..558369dc 100644 --- a/config/cors.php +++ b/config/cors.php @@ -15,7 +15,7 @@ | */ - 'paths' => ['api/*', 'sanctum/csrf-cookie'], + 'paths' => ['api/*'], 'allowed_methods' => ['*'], diff --git a/config/sanctum.php b/config/sanctum.php deleted file mode 100644 index 529cfdc9..00000000 --- a/config/sanctum.php +++ /dev/null @@ -1,67 +0,0 @@ - explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( - '%s%s', - 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - Sanctum::currentApplicationUrlWithPort() - ))), - - /* - |-------------------------------------------------------------------------- - | Sanctum Guards - |-------------------------------------------------------------------------- - | - | This array contains the authentication guards that will be checked when - | Sanctum is trying to authenticate a request. If none of these guards - | are able to authenticate the request, Sanctum will use the bearer - | token that's present on an incoming request for authentication. - | - */ - - 'guard' => ['web'], - - /* - |-------------------------------------------------------------------------- - | Expiration Minutes - |-------------------------------------------------------------------------- - | - | This value controls the number of minutes until an issued token will be - | considered expired. If this value is null, personal access tokens do - | not expire. This won't tweak the lifetime of first-party sessions. - | - */ - - 'expiration' => null, - - /* - |-------------------------------------------------------------------------- - | Sanctum Middleware - |-------------------------------------------------------------------------- - | - | When authenticating your first-party SPA with Sanctum you may need to - | customize some of the middleware Sanctum uses while processing the - | request. You may change the middleware listed below as required. - | - */ - - 'middleware' => [ - 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, - 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, - ], - -]; diff --git a/routes/console.php b/routes/console.php index e05f4c9a..b3d9bbc7 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,19 +1 @@ comment(Inspiring::quote()); -})->purpose('Display an inspiring quote');