Same issue here, but configured Facebook and Twitter perfect.
Google OAuth plugin
- Edited
Pilvinen Having the same problem. Did you succeed to setup Google Auth?
christophermh44
OK got it!
You have to enable Google+ API inside Google Console ?
Awesome! That did the trick for me, too. Thanks, christophermh44!
Thanks so much christophermh44, it worked for me as well ? ?
- Edited
Looks like I needed <domain url>/auth/google as the redirect URI. That fixed the problem for me.
I have all the urls enabled and the g+ api enabled aswell, and it asks for the permissions. However, it hangs at http://forum.devpy.me/auth/google and does not login.
- Edited
rawsh If you've just enabled the G+ API, you will probably have to wait a few minutes.
christophermh44 Still not working. I can send screen recording if you like.
rawsh You can try, but I'm not an expert. By the way, I caught the problem by a dirty but efficient solution: I put those line where I want to debug some variables:
ob_start();
var_dump($var1, $var2, etc.);
echo ob_get_clean(); die;
Or,
ob_start();
var_dump($var1, $var2, etc.);
file_put_contents('/path/to/debug/file', ob_get_clean()); die;
christophermh44 Ok thanks, I will try it.
We're looking into a fix - will share it once available (could be two weeks)
- Edited
Answer is straigtforward but not clear from the docs:
1 - Do not use the optional "Hosted Domain" input
2 - In your Google API console you also have to (and this isn't self evident, or even present) from Google's Documentation):
- Go to the "Library" (aka link in the left-hand sidebar that enumerates available APIs)
- Click on "Google + API"
- Near the top of the "Google + API" display click "Enable"
It should now work.
We have tested this on two separate flarum installs. One on AWS/EC2 and one on a local, but publically routable KVM/Ubuntu setup.
Many thanks to our intern Moh who figured out this tiny crucial step. Lord knows I couldn't.
- Edited
Images for those who like some pictures. I do. ?
ThatGuy I will be the first to say thank you.
For some reason, this fixed the mobile requests. Now on mobile it works, but on desktop it has the same problem with all browsers I tried: The request goes through, redirects to your site, but its a blank page and it does not authenticate. Heres a demo on my fledgling forum: http://forum.devpy.me
rawsh ? I see. On one hand, the pop-up window redirects us back to your Flarum install, and google's behaviour indicates the "Allow" preference for a given account has been set against your API key/setup. It's just the final setup/redirect on the flarum side - I can tell you that in both cases we're using 16.04.1, NGINX reverse proxies with FPM, and php7. I dunno if that helps.
I've updated the README.MD with some stuff, and tried to clear what the 'Hosted Param' field is for. A step by step guide for setting up everything on the Google side will be done shortly.
Sorry for the delay's in getting back, I've been up the wall with work trying to get things up and running and stuff to manage continuously.
This is what my Credentials page looks like in the Google API Console:
https://i.imgur.com/bNslnFb.png
For Javascript Origins: I have set both http and https on live server and the http for my local,
For Authorised redirect URL, it ends in /auth/google.
I will clear this up in the documentation
Would be super cool if you could add google authenticator support
FYI - I was having all sorts of issues.
Turns out when I click on the Copy API button, it copied an extra space before the API key.
The Google+ API Enable also was the kicker.
Thank you.