Search code examples
phplaravelgoogle-signinhybridauth

Google login in redirect loop using HybridAuth


I am using atticmedia/anvard package in laravel for social login. Login for the facebook works fine, but when I login using google, it stays in a redirect loop. The google login page is successfully shown and when i have given access it redirects back to http://domain.com/endpoint?hauth.done=Google&code=XXXX#

I have no idea why is this not working. Any help would be appreciated. Thanks.


Solution

  • Apparently you need to enable Google+ and Contacts API in the APIs google console. Wandered two days and this was the issue. I feel so stupid. But seems like this information isnt mentioned much in the internet.