Accessing the Google Sign-In Settings
You can access the main KC:Web Settings by going to “KC:Web
Settings” -> “Available Options” on the left-hand menu.
Then click on the "Sign In" tab to switch to view all of the available sign in plugins.
You will then need to click on the “Google Sign In” tab to
switch the view to the options for this plugin.
Available Options
Enabled?: Select whether the Google Sign-in
functionality should be enabled on the site.
Google Client ID: Enter the Client ID for the OAuth
2.0 client setup within Google Cloud.
Google Cloud
For Google Sign-in to
work correctly an OAuth 2.0 client will need to be setup in Google Cloud console.
To do this you will need to:
- Go to https://console.cloud.google.com/.
- Select an existing Project or setup a new one.
- Go to “APIs and services” -> “Credentials”.
- Click “Create credentials” and select “OAuth
client ID”.
- Select “Web application” as the “Application
type”.
- Give it a suitable name.
- Enter your website’s base URL into “Authorised
JavaScript origins”.
- Enter your website’s base URL followed by “/account/google-sign-in/”
into “Authorised redirect URIs”. For example: https://www.website.com/account/google-sign-in/.
- Save the credentials and take note of the client
ID as this will need to be entered into the options in the CMS.
You will also need to setup and verify the “OAuth consent
screen”, more information on how to do this can be found on Google.
As part of this process you will need to select the following
scopes for access:
- .../auth/userinfo.email
- .../auth/userinfo.profile
Accounts
If a customer registers an account using Google Sign-In their
email address and name will be taken from the data provided by Google, but they
will need to enter the rest of their details. The password field will not be available
as this is pre-set to a unique code that the website can re-create when
handling log ins from Google accounts.
If a Google customer resets their password, the Google Sign-in
functionality will no longer work for them, as they will no longer have the
pre-set password, and they will need to use the standard log in functionality.