mirror of https://github.com/pixelfed/pixelfed.git
Add laravel passport
This commit is contained in:
parent
547ac5c8f9
commit
ac27365a63
|
@ -3,6 +3,7 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Laravel\Passport\Passport;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -24,6 +25,10 @@ class AuthServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
Passport::routes();
|
||||
|
||||
Passport::tokensExpireIn(now()->addDays(15));
|
||||
|
||||
Passport::refreshTokensExpireIn(now()->addDays(30));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ return [
|
|||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'driver' => 'passport',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue