I am trying to implement the Google+ log in /sign in button on a website I'm coding through Sublime Text2 and running through Apache. I'm VERY new to web development and using localhost / http://127.0.0.1 .
So my questions comes in because when I have the button in the "index" Chrome HTML Document, it runs fine and I can log in with my google+ account.
BUT, if I have the button in a webpage linked to it (a new document "signin" Chrome HTML Document) the log in does not go through. It will pull up my accounts but it won't let me log in completely.
ERROR Error: origin_mismatch
I think I have to change something in my JavaScript Origins in my Credentials in my API's and Auth, but it won't let me add something like http://localhost/signin.html It says
Origins URIs must not contain a path: http://localhost/signin.html
How can I give this webpage access??
Thank you!
To create a Google Sign-In button with custom settings, add an element to contain the sign-in button to your sign-in page, write a function that calls signin2. render() with your style and scope settings, and include the https://apis.google.com/js/platform.js script with the query string onload=YOUR_RENDER_FUNCTION .
Google Sign-in is a free service. To use Google sign-in you have to use Google's Firebase authentication service.
OAuth 2.0 allows users to share specific data with an application while keeping their usernames, passwords, and other information private. For example, an application can use OAuth 2.0 to obtain permission from users to store files in their Google Drives. This OAuth 2.0 flow is called the implicit grant flow.
What was happening to me was that the UX on the redirect URI / authorized origin was confusing me and the "save" button wasn't working. Just because the item has been added to the list, doesn't mean it has been saved. Also, ensure you've added the correct port if it is non-standard.
Origins URIs must not contain a path: http://localhost/signin.html
http://localhost/signin.html
without a path becomes http://localhost
. You must edit your application in the Google Developers Console so that it does not have a path.
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