diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 72bcbea97..611ab940f 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -9,6 +9,7 @@ use App\Models\User; use DariusIII\Token\Facades\Token; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; use Illuminate\Http\Request; +use Illuminate\Support\Str; class ForgotPasswordController extends Controller { @@ -62,7 +63,7 @@ class ForgotPasswordController extends Controller // // Generate a forgottenpassword guid, store it in the user table // - $guid = Token::random(32); + $guid = Str::random(32); User::updatePassResetGuid($ret['id'], $guid); // // Send the email diff --git a/app/Models/User.php b/app/Models/User.php index 9f22ed0f6..8b9748beb 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -528,7 +528,7 @@ class User extends Authenticatable */ public static function generatePassword(int $length = 15): string { - return Token::random($length, true); + return Str::password($length); } /** diff --git a/composer.json b/composer.json index c8225abe1..f0cff7f90 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,6 @@ "dariusiii/php-itunes-api": "^1.0", "dariusiii/rarinfo": "^2.7", "dariusiii/tmdb-laravel": "^6.0", - "dariusiii/token": "^5.0", "dborsatto/php-giantbomb": "^2.2", "divineomega/php-cli-progress-bar": "^2.1", "doctrine/dbal": "^3.8", diff --git a/composer.lock b/composer.lock index 8899d7e09..3beaa08ad 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": "5ab151a8fea6ff561d73c3e3c25e6cc8", + "content-hash": "01624044ef88773d39b2631f4d9375f5", "packages": [ { "name": "aharen/omdbapi", @@ -1079,65 +1079,6 @@ }, "time": "2023-11-29T11:33:57+00:00" }, - { - "name": "dariusiii/token", - "version": "v5.0.0", - "source": { - "type": "git", - "url": "https://github.com/DariusIII/laravel-token.git", - "reference": "713cdffe185e4dab26d6a79ae4663cc8329df18b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/DariusIII/laravel-token/zipball/713cdffe185e4dab26d6a79ae4663cc8329df18b", - "reference": "713cdffe185e4dab26d6a79ae4663cc8329df18b", - "shasum": "" - }, - "require": { - "illuminate/support": "^8.0|^9.0|^10.0", - "php": ">=8.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "DariusIII\\Token\\TokenServiceProvider" - ], - "aliases": { - "Token": "DariusIII\\Token\\Facades\\Token" - } - } - }, - "autoload": { - "psr-4": { - "DariusIII\\Token\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "MustafaKhaled", - "email": "MustafaKhaled.dev@gmail.com" - } - ], - "description": "Unique Token Generator For Laravel", - "keywords": [ - "PHP token", - "generate", - "laravel", - "laravel token", - "token", - "token generator", - "unique token" - ], - "support": { - "source": "https://github.com/DariusIII/laravel-token/tree/v5.0.0" - }, - "time": "2023-02-16T17:40:32+00:00" - }, { "name": "dasprid/enum", "version": "1.0.5",