An error occurred with the token transfer. Laravel, Google Drive API

An error occurred with the token transfer. Laravel, Google Drive API

Provider Code

class GoogleDriveServiceProvider extends ServiceProvider
{

    public function register()
    {
        //
    }
    
    public function boot()
    {
        Storage::extend('google', function($app, $config) {
            $client = new \Google_Client();
            $client->setClientId($config['clientId']);
            $client->setClientSecret($config['clientSecret']);
            $client->refreshToken($config['refreshToken']);
            $client->setAccessType('offline');
            $client->setApprovalPrompt('force');

            $service = new \Google_Service_Drive($client);
            $adapter = new GoogleDriveAdapter($service, $config['folderId']);

            return new Filesystem($adapter);
        });
    }
}

Error image

When uploading a project to Heroku, this error occurs введите сюда описание изображения

Please tell me how to solve this problem, thank you in advance.


Ответы (0 шт):