Attempting to log in using Google account in cfoauth tag

I am trying to login using the <cfoauth> tag, but am not able to do so. It is showing

Error: invalid_request

Below is my code.

<cfoauth
type = "google"
clientid = "*****************es7t0r6qc"
secretkey = "**************tSF97WncM5ix9jtvD200"
result = "result"
scope="https://www.googleapis.com/auth/plus.me"
redirecturi = "http://192.168.9.126:8088/bootstrap-blog-template/tpl/cfoauth.cfm"
>

Please help.

Answers


The problem seems to be related to redirecturi. You need to provide an existing and valid URL of the page on which you want to redirect to after authentication.

For example if local URL of the page you are testing the code is http://localhost:8500/cfbuster/login.cfm , then redirecturi can be same page i.e. http://localhost:8500/cfbuster/login.cfm or another page http://localhost:8500/cfbuster/doLogin.cfm.

Apart from this, the redirecturi you wish to set, should be saved in Google Developers Consele >> API Manager >> Credentials screen under Authorized redirect URIs. In my case it is http://localhost:8500/cfbuster/test.cfm

In case the redirecturi passed is non existing or not saved in the API Authorized redirect URIs screen we get following error message:

Note 1: The redirecturi Must have a protocol. Cannot contain URL fragments or relative paths. Cannot be a public IP address.

Note 2: https://www.googleapis.com/auth/plus.login is the recommended login scope. The https://www.googleapis.com/auth/plus.me scope is not recommended as a login scope because, for users who have not upgraded to Google+, it does not return the user's name or email address.


Need Your Help

after importing products into magento they dont show up catalog

php import magento

After i import the products into magento which appears to go smoothly no errors; the products aren't visible in the store. however if i go to any product and save(even without changing anything) it...

ImportError: Could not import settings

django python-2.7

On Windows 8, I've created a sample project in Django (1.6.5) and I'm getting errors when I run a custom command I wrote (runtcpserver).