...
- Go to https://console.developers.google.com/project/_/apiui/apis/library and login to your Google account.
- Select your API project from the dropdown, or create a new one.
or- Select the Credentials menu, and the OAuth consent screen tab.
- Select the email address, enter your product Product (website) nameName, and click Save.
(You can populate the optional fields now too, if you choose.)- From the Create credentials dropdown, select OAuth client ID.
Select Web application and enter your site name Name and JavaScript origins.
Tip Google advises as follows regarding JavaScript origins:
- Click Create, and you now have a Client ID! Copy Copy this down somewhere.
2. Configure Google Sign-In
...
- In the CMS, navigate to Settings → Feature Settings.
- Edit the Third Party Login feature.
Toggle the Registration Page and Allow Linking options on/off as required for your website. These options are explained in the table below.
logged
Option Description Example Use Registration Page Displays additional registration fields to the user after they've
to
signed in
with Google. You can use this to request more info from your customer before they click Login.
(This screen is only shown on the user's first login.)
Allow Linking To Existing Users Allows a user to login with Google, then link that login to an existing account on your site (if they have one).
This retains all of the user's order history, favourites, etc, with the benefit of a quick Google sign-in.
(This screen is only shown on the user's first login.)
- Enter your Client ID from Google into the Sign-In Client ID field.
- In the Token Info Endpoint field, enter the following: https://www.googleapis.com/oauth2/v3/tokeninfo?id_token={0}
- Enable Google Sign-In with the toggle, then click Save!
3. Optional Customisations
...
Google Sign-In is a great way to get your customers logged in and shopping with you faster. And your users will no doubt appreciate not having to remember yet another password!
...