Question: I am trying to reload the previous page from where I opened a popup (a php file) with window.open function. I was able to close the popup with self.close() function, but previous page from where I opened the popup is not auto refreshing.

```
<script type='text/javascript'>
    location.replace(document.referrer);
    self.close();
</script>

```

Answer: 
if you entered your `client_id` and `secret_id` **config/services.php** then run `php artisan config:clear`
I had faced the same issue and I finally came to a solution. The problem is probably due to the depreciation of app['request'] in *SocialiteManager.php* file located in *Vendor/Laravel/Socialite/src/SocialiteManager.php*.

The solution to this problem is by following the following steps:

> 
> **Step 1:** Go to *Vendor/Laravel/Socialite/src/SocialiteManager.php*.  
> 
> **Step 2:** Copy and paste the following code in buildProvider method.
> 
> 
> 
> ```
> public function buildProvider($provider, $config)
>     {
>         return new $provider(
>             $this->container->make('request'),
>             $config['client_id'],
>             $config['client_secret'],
>             $this->formatRedirectUrl($config),
>             Arr::get($config, 'guzzle', [])
>         );
>     }
> 
> ```
> 
> **Step 3:** Run *php artisan config:cache* and *php artisan cache:clear* to clear the previous cache then run the app. Hola!
> You're done!
> 
> 
>