mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Set longer token expiration
This commit is contained in:
parent
4590054c75
commit
93a087b29a
|
@ -3,6 +3,7 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use App\Models\Accessory;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Asset;
|
||||
use App\Models\Component;
|
||||
use App\Models\Consumable;
|
||||
|
@ -43,12 +44,14 @@ class AuthServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->registerPolicies();
|
||||
Passport::routes();
|
||||
Passport::tokensExpireIn(Carbon::now()->addYears(20));
|
||||
Passport::refreshTokensExpireIn(Carbon::now()->addYears(20));
|
||||
|
||||
|
||||
// --------------------------------
|
||||
// BEFORE ANYTHING ELSE
|
||||
// --------------------------------
|
||||
// If this condition is true, ANYTHING else below will be asssumed
|
||||
// If this condition is true, ANYTHING else below will be assumed
|
||||
// to be true. This can cause weird blade behavior.
|
||||
Gate::before(function ($user) {
|
||||
if ($user->isSuperUser()) {
|
||||
|
|
Loading…
Reference in a new issue