mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 15:55:14 +00:00
Add laravel passport
This commit is contained in:
parent
547ac5c8f9
commit
ac27365a63
2 changed files with 7 additions and 2 deletions
|
@ -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 a new issue