mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update AuthServiceProvider
This commit is contained in:
parent
e10b2b93a4
commit
dbcd5ff2e4
1 changed files with 2 additions and 4 deletions
|
@ -4,7 +4,7 @@ namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
use Laravel\Passport\Passport;
|
use Laravel\Passport\Passport;
|
||||||
use Gate, Route;
|
use Gate;
|
||||||
|
|
||||||
class AuthServiceProvider extends ServiceProvider
|
class AuthServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
@ -27,9 +27,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
$this->registerPolicies();
|
$this->registerPolicies();
|
||||||
|
|
||||||
if(config('pixelfed.oauth_enabled')) {
|
if(config('pixelfed.oauth_enabled')) {
|
||||||
Route::group(['middleware' => 'cors'], function() {
|
Passport::routes();
|
||||||
Passport::routes();
|
|
||||||
});
|
|
||||||
Passport::tokensExpireIn(now()->addDays(15));
|
Passport::tokensExpireIn(now()->addDays(15));
|
||||||
Passport::refreshTokensExpireIn(now()->addDays(30));
|
Passport::refreshTokensExpireIn(now()->addDays(30));
|
||||||
Passport::enableImplicitGrant();
|
Passport::enableImplicitGrant();
|
||||||
|
|
Loading…
Reference in a new issue