Dynamic OauthDriver scope (#544)
* Dynamic OauthDriver scope * support migration for mysql * Refactor default scopes for integrations * Small UI changes * fix flet select tooltip * fix linter * Fix google token size in DB --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -26,8 +26,10 @@ class OAuthProviderController extends Controller
|
||||
$userId = Auth::id();
|
||||
cache()->put("oauth-intention:{$userId}", $request->input('intention'), 60 * 5);
|
||||
|
||||
// Connecting an account for integrations purposes
|
||||
// Adding full scopes to the driver
|
||||
return response()->json([
|
||||
'url' => $service->getDriver()->getRedirectUrl(),
|
||||
'url' => $service->getDriver()->fullScopes()->getRedirectUrl(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -47,6 +49,7 @@ class OAuthProviderController extends Controller
|
||||
'refresh_token' => $driverUser->refreshToken,
|
||||
'name' => $driverUser->getName(),
|
||||
'email' => $driverUser->getEmail(),
|
||||
'scopes' => $driverUser->approvedScopes
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user