Google Connect Magento extension

Since pretty much everyone now days has Google account, wouldn’t it be nice if customers could register or create an account at your store using their Google account credentials? I think it would, that’s why I’ve created Google Connect extension for Magento. In this article I’ll present simple instructions on how to install this free extension, and configure it for usage by creating Google API Client ID.

Introduction

Inchoo Google Connect is designed to integrate into Magento to allow you customers to easily login using their Google account. After you install this extension, most probably first thing you’ll notice is that customers are given access to Connect button at your Login or Create Account page:

By proceeding with Google Connect process, first time customer will automatically get an account at your store, and be able to login with his Google credentials at any time. Customer will also receive new account email as if he created account manually, and will be able to login using his regular store account credentials if that’s what he desires. Customer’s store account will remain connected to his Google account until he revokes permissions using Google interface, or disconnects his store account from Google account using Inchoo Google Connect logged in customers interface:

Customers will also be able to login using their Google account using Connect button at the first step of checkout process:

Please note that this Magento extension has been designed to work with default Magento theme, and if your theme has been heavily modified you might need to tweak Inchoo Google Connect code to use it to it’s full potential. Also note that this extension has been created for Magento Community Edition 1.7.0.2, but I’ll do my best to release promptly updates for future Magento Community Edition versions.

Installation Instructions

First step is to download Inchoo Google Connect Magento extension zip package, and extract contents of directory it provides into your Magento installation root. If you’re a developer you would most probably be interested into the fact that this extension is also available from its GitHub repository page. Now you can log into your Magento admin area and go to System -> Configuration -> Customers -> Customers Configuration. If you find tab named Google Connect Options there, Inchoo Google Connect has been successfully installed. Before your customers can log into your store using their Google account credentials, you must configure Inchoo Google Connect by creating Google API Client ID.

Creating Google API Client ID

After you finish this paragraph, you will have two pieces of data required for Inchoo Google Connect operation, namely Google API Client ID and Google API Client Secret. First log into your google account, and then go to Google APIs Console. There you need to create project for your web store, and obtain required information for configuring Inchoo Google Connect on your Magento installation. During the course of creating Google API Client ID you will need to properly provide Google APIs Console with the following information:

Don’t forget to replace http://www.yourstore.com with your store URI. Here’s gallery of screenshots that should securely guide you trough this process:

Configuring Google Connect Options

After you have obtained your Google API Client ID and Google API Client Secret, you can once again go to your Magento admin area and go to System -> Configuration -> Customers -> Customers Configuration -> Google Connect options. There you should enable Inchoo Google Connect and enter required data into an appropriate input fields:

All that’s left to do now is click Save Config button at the top right of your page and you’re good to go.

Where to go next?

If you are a developer, you’ll definitely want to checkout Inchoo Google Connect GitHub repository page. On the other hand if encounter any difficulties with Inchoo Google Connect, or have an idea for a feature, please leave your comment here and I’ll will respond as soon as possible.

60 comments

Hi
The plugin is working fine, but when register user give the username and password in cart page, the url redirecting to login page again, please help me to fix this issue.
I checked this issues is because of your plugin only.

Problem. I have installed this extension, But for me after success it redirects to the login page instead of account page. When i hit refresh then it will show success message and redirects to the account page. Any idea about this? Only in chrome and Opera. Firefox and Internet Explorer are fine. Havent checked Safari yet.

It can be URL mismatch between your site’s actual URL and the redirect URL you set in Google Developer Console. Your actual site’s URL seems to be without ‘www’ but your redirect URI in developer console can be with ‘www’. Or, an absence of slash at the end of the redirect URI also can cause the error.

Am using this below code for custom buttom and it is working for me
$cpBlock = $this->getLayout()->getBlockSingleton(‘Inchoo_GoogleConnect_Block_Button’);
<a class="btn-g btn-default-g google" href="_getButtonUrl(); ?>”> Sign In with Google+

Hello I am having an issue with the installation. I am using a customized template. I copied the files that would typically go into the default community edition folders into the new theme folders, but the extension tabs do not appear in the system settings. What am I doing wrong?

Excellent plugin first of all. Thanks for saving hours/days of efforts. However, after setting up everything correctly social login works fine, however, after redirection to website the user is still not logged in..Any suggestion? I am using a custom theme here..

It is actually the social connect (Inchoo_SocialConnect-0.2.3). I forgot to mention, Facebook works fine. For google, everything is successful except that user is not loggedIn in magneto store ( I guess there could be some OAuth Error but I am not sure). Its just wierd since it successfully verifies the user account and should actually create the same in magento store but don’t know what is wrong. Do you have any suggestion here.

Thanks for the reply. However, still pretty much the same. A successful login on google but no user created in magento. Pretty strange thing. Just to mention, I just did a simple overwrite on the previous version and have not changed anything. Could that be the reason? or is it something different?

First off… this plugin is great! However, every time I log in I am re-directed to the Google API authorization page. In our case, it is confirming the user wants to allow access to basic account info and email address. Certainly makes sense that a first time user would see this, but how come I get it every time I log out and then log back in? Thanks!

Hello,
this shouldn’t be the case. I suggest you try Social Connect Magento extension because it contains all features of Google Social connect + Facebook & Twitter support. It also contains more intelligent after login redirect code amongst other improvements.

Hi,
first thing I would usually recommend is using Social Connect Magento extension that has all features of Google Connect + Facebook and Twitter connect if you wish to use it. But in this case I would really advise you to upgrade to latest Magento CE because install script both extensions use isn’t compatible with older Magento versions.

@Marko
Thanks for the solution to the virtual localhost problem.
But i would be very glad if i get to know about the places to change the namespaces and get the extension working.
thanks for the local host problem once again

Hi again,
I’ve taken some time to test with Magento installed inside domain subdirectory and it appears in this case ___SID=U query parameter is added to redirect URI. This makes redirect URI invalid and that’s why you got the URI mismatch error. Also article had a typo inside installation instructions section where I forgot to include trailing slash on redirect URI.
I’ve adjusted code and installation instructions a few minutes ago, so if you update your Google Connect using latest ZIP package now, and edit your Google client ID settings with http://example.com/magento/googleconnect/index/connect/ redirect URI (notice trailing slash), Inchoo Google Connect will most certainly work fine for you. And thanks for the bug report, I would never caught this one on my own 😉

Your email address will not be published. Required fields are marked *

Comment *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.