I am trying to implement login with Google Plus in my website using JavaScript. My origin URL is http://www.locallylahore.com
and my redirect URL is http://www.locallylahore.com/oauth2callback/
. I tried removing www
from my URLs, but it didn't work.
My website URL is http://locallylahore.com/map.php
.
You have to make sure to add
http://locallylahore.com
to the "JavaScript origins" in the Google Developers Console. Since your website is reachable with and without www I would keep both variants in there. If you try to sign-in athttp://www.locallylahore.com/map.php
you will see that you don't get the error since you apparently already have the www-variant correctly in the Javascript origins.Please be aware that changing the origin can take several minutes before it is active, so trying to sign-in right after changing the setting won't work.