I was working on a project involving HybridAuth and after google for a long time; I was not lucky. Finally I tried trial and error technique and found that to fix this error, the base_url in the code (config.php) should be like:
"base_url" => "http://localhost/hybrid/index.php",
And for google developers console the ‘Redirect URIs’ must be:
The vagrant shares the code folder as NFS (Network file share) on the guest machine and therefore you cannot change the permissions of the vagrant or assets directory inside guest machine using local file permissions eg chmod etc.
There are two solutions.
1. Add user www-data (apache is run under this) to vagrant group by using command:
sudo usermod -a -G vagrant www-data
2. Change apache file /etc/apache2/envvars so that apache runs under user/group vagrant.
sudo nano /etc/apache2/envvars
and change it to:
sudo service apache2 restart