Skip to content

Commit

Permalink
[5.x] Alternate Laravel 12 token repository fix (#11505)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored Feb 26, 2025
1 parent da24318 commit dd8f37b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 114 deletions.
98 changes: 0 additions & 98 deletions src/Auth/Passwords/LaravelTwelveTokenRepository.php

This file was deleted.

15 changes: 2 additions & 13 deletions src/Auth/Passwords/PasswordBrokerManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,12 @@ protected function createTokenRepository(array $config)
$key = base64_decode(substr($key, 7));
}

if (version_compare(app()->version(), '12', '<')) {
return new TokenRepository(
$this->app['files'],
$this->app['hash'],
$config['table'],
$key,
$config['expire'],
$config['throttle'] ?? 0
);
}

return new LaravelTwelveTokenRepository(
return new TokenRepository(
$this->app['files'],
$this->app['hash'],
$config['table'],
$key,
($config['expire'] ?? 60) * 60,
$config['expire'],
$config['throttle'] ?? 0
);
}
Expand Down
3 changes: 0 additions & 3 deletions src/Auth/Passwords/TokenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
class TokenRepository extends DatabaseTokenRepository
{
protected $files;
protected $hasher;
protected $hashKey;
protected $expires;
protected $path;

public function __construct(Filesystem $files, HasherContract $hasher, $table, $hashKey, $expires = 60, $throttle = 60)
Expand Down

0 comments on commit dd8f37b

Please sign in to comment.