From c4151c3751da1933bdcbc78f9ee8e6fe37123bdc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 8 Apr 2019 01:30:47 -0600 Subject: [PATCH] Update AuthServiceProvider --- app/Providers/AuthServiceProvider.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 968d43ed..4a647cbd 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -25,8 +25,19 @@ class AuthServiceProvider extends ServiceProvider { $this->registerPolicies(); - // Passport::routes(); - // Passport::tokensExpireIn(now()->addDays(15)); - // Passport::refreshTokensExpireIn(now()->addDays(30)); + Passport::routes(); + Passport::tokensExpireIn(now()->addDays(15)); + Passport::refreshTokensExpireIn(now()->addDays(30)); + Passport::enableImplicitGrant(); + + Passport::setDefaultScope([ + 'user:read', + 'user:write' + ]); + + Passport::tokensCan([ + 'user:read' => 'Read a user’s profile info and media', + 'user:write' => 'This scope lets an app "Change your profile information"', + ]); } }