I am trying to use the Codeigniter spark ( http://getsparks.org/packages/oauth2/versions/HEAD/show) to allow users to login to my php site with fb and google.
My local dev site (on wampserver) is called mysite.dev, for which I have a etc/hosts file like :
127.0.0.1       mysite.dev
Facebook login works absolutely fine. But when I try logging with google, google complains : Invalid parameter value for redirect_uri: Non-public domains not allowed: http://mysite.dev/index.php/oauth2/session/google where oauth2 is my controller and session is the function where I specify fb/google, etc
any clues/hints?
I got around this by adding a hosts file record for the domain with the dev part at the front rather than the end (which I usually do too):
/etc/hosts
127.0.0.1 localhost.mydomain.com
/etc/apache vhost
ServerName mydomain.com.localhost
ServerAlias localhost.mydomain.com
Then tell google to use:
http://localhost.mydomain.com/index.php/oauth2/session/google
                        When you create client ID for web applications in Google APIs Console you can add allowed Redirect URIs. It accepts localhost urls and others as well.
Google API Console does not allow 'mysite.dev'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With