|
@@ -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"',
|
|
|
+ ]);
|
|
|
}
|
|
|
}
|