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