mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Updated AuthServiceProvider, added support for configurable OAuth tokens and refresh tokens lifetime
This commit is contained in:
parent
93a76b3c05
commit
7cfae612db
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ class AuthServiceProvider extends ServiceProvider
|
|||
|
||||
if(config('pixelfed.oauth_enabled')) {
|
||||
Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]);
|
||||
Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration')));
|
||||
Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration')));
|
||||
Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 15)));
|
||||
Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 30)));
|
||||
Passport::enableImplicitGrant();
|
||||
if(config('instance.oauth.pat.enabled')) {
|
||||
Passport::personalAccessClientId(config('instance.oauth.pat.id'));
|
||||
|
|
Loading…
Reference in a new issue