Introduction

Sign in with Google helps you to quickly manage user authentication on your website. It allows users to easily and securely sign into your site with their Google Account and securely share their profile information with your site without using a username and password.  

This feature is rolling out to users as of Site Kit version 1.43.0.

In order to use Sign in with Google, websites are required to be fully secure (https). The feature will not be available if your website is requested as insecure (http). 

Setting up Sign in with Google

Sign in with Google can be configured by clicking on the Set up Sign in with Google button that appears in the notification banner in the header of the Site Kit dashboard when this feature becomes available. 

A screenshot of the banner notification that appears when Sign in with Google is available
The banner notification that appears when Sign in with Google is available

The set up process can also be initiated via Site Kit > Settings > Connect More Services > Sign-in with Google. Clicking on Set up Sign-in with Google will start the process. Click on Maybe later to dismiss this banner permanently. 

The module is ready to be connected

When using Sign in with Google, a project is created using Google Cloud Platform. If you’re using a Google Workspace account, this service must be enabled. 

After starting the Sign in with Google process, you will need to enter your Client ID. This is required in order to complete Sign in with Google. Click on the Get your client ID button to start the process of obtaining your Client ID. 

The initial set up screen

A new window will open, displaying some details automatically captured from your site. Click on the Get OAuth Credentials button.

The information generated for your site, in order to capture your credentials 

A new popup will appear, displaying an auto generated project name. You can modify this if you wish. The name can not include any special characters,including periods or dashboard. Click on the NEXT option option for your credentials to generate.

The Google Cloud Project title

A new screen will appear, which will display your Client ID and Client Secret. Copy the Client ID by clicking on the copy icon to the right of the ID, highlighted below. 

The credentials generated, highlighting the “copy” button

Revisit the Site Kit settings page where you were configuring Sign in with Google, and paste in the Client ID. After doing this, click on Complete Setup.

The set up page within Site Kit, highlighting the area to paste your Client ID and the button to proceed

Once set up is complete, you will be directed back to the Site Kit dashboard. A banner notification will appear to confirm that Sign in with Google has been successfully set up. Click on OK, Got it! to dismiss this notification.

The congratulations notice that appears after set up is complete

Using Sign in with Google

When Sign in with Google is enabled, the wp-login page that typically displays a username and password field, will include a button to Sign in with Google. This button is customizable, and the label can include one of the following:

  • Continue with Google 
  • Sign in 
  • Sign in with Google 
  • Sign up with Google

Clicking on the button allows a user to sign in with their Google account. Users can select their preferred Google account to sign in with.

If users have signed into your website before, using Sign in with Google, the button presented to users will include their email address and avatar. 

The Sign in with Google option on the WordPress login page
The Sign in with Google option on the WordPress login page, highlighting a previously logged in Google account
The Sign in with Google option on a WooCommerce login page.

Allowing user registration with Sign in with Google

If you allow new users to register on your site, using the standard WordPress Anyone can register setting (Settings > General > Membership > Anyone can register), Sign in with Google can be used for users to register. 

One Tap

One Tap allows users to sign in to your site or register for your site with a one click prompt that can appear if they have an active Google session on the same browser. The prompt will offer a “Continue as” button on the login page for your site, or across all pages if you have the One Tap enabled on all pages configuration enabled. 
If the One Tap prompt is dismissed, by clicking on the X at the top-right corner of the prompt, the One Tap feature will not appear for a period of time, as defined in this guide

A screenshot of the one tap login prompt

Settings

Once Sign in with Google is connected, the settings for it can be accessed from Site Kit > Settings > Connected Services > Sign in with Google.

The following settings are available:

  • Client ID: This is the configuration where you submitted your Google Cloud Project’s Client ID. See the Setting up Sign in with Google section above.
    The Client ID configuration
  • Button text: This setting can be used to configure the text label the users will see on the login screen. 
  • Button theme: This setting can be used to configure the theme and style of the button on the login screen. 
  • Button shape: This setting can be used to configure your preferred shape.
    Client ID: This is the configuration where you submitted your Google Cloud Project’s Client ID. See the Setting up Sign in with Google section above.
    The styling options for the Sign in with Google button
A button preview box will demonstrate how your button will appear when configured
  • Enable One Tap sign in: When enabled, One Tap allows users to sign in or sign up to your website with a single click, or in cases where there are multiple browser sessions from different Google accounts, an additional click. This is not enabled by default.
  • One-Tap enabled on all pages: This setting allows you to enable the One Tap feature across all pages of your site.
    The One Tap options
  • Users can create new accounts: This isn’t a setting that can be configured within Site Kit. It’s linked to the Anyone can register checkbox setting from Settings > General.

    In the case of a multisite, the WordPress configuration will appear as Allow new registrations, which can be accessed via MySites > Network Admin > Settings. The status of this setting is shown on the Sign in with Google settings screen, as depicted below.
The notice that appears when user registrations is not enabled
The notice that appears when user registrations is not enabled on a multisite network
The WordPress “Anyone can register” setting 
The WordPress “Allow new registrations” setting on a multisite network 

Multisites

If using a multisite, Sign in with Google can be configured individually on sites within that network, along with the primary site. Within the Site Kit settings for Sign in with Google, the mention of Anyone can register will appear as Allow new registrations.

When registration is enabled for sites within a multisite network, new users registering for individual sites within the network will be registered with the default role when they sign in for the first time.

FAQs

  • How do I know if Sign in with Google is working?
    After you configure Sign in with Google, a banner notification appears on the Site Kit dashboard to inform you that the feature has been successfully connected. The next time you, or any other user visits your login page, there will be an option to Sign in with Google.
  • I forgot my Client ID. Where can I find it?
    If you forgot your Client ID, you can visit the project directly on the Google Cloud Project page. A project related to this feature will exist. From there you can visit the credentials page and capture the Client ID.

    Another option is to go through the plugin set up once more. Note however, this will result in an additional Google Cloud project being created. There is a limit to the number of Google Cloud Projects that each Google account can operate.
  • Can new users register for my site using Sign in with Google?
    Yes, new users can register. Before they can register, the WordPress Anyone can register configuration must be checked (Settings > General > Anyone can register).  
  • How do I reset users’ passwords if they Sign in with Google?
    Users use their own Google account to Sign in with Google. While it’s not possible to reset their Google account login, you can visit their user profile within your WordPress site, and set a password from there. By doing so, they can login with their username and password as opposed to using Sign in with Google.
  • How do I know how many users registered for my site using Sign in with Google?
    If you visit the users tab of your WordPress dashboard, the username for any user who registered for your site using Sign in with Google will be an email associated with their Google account. This gives you an indication that they may have used the Sign in with Google feature.

    If you open any user profile that has used Sign in with Google, there will be a Sign in with Google via Site Kit by Google section.

  • How do I disconnect a user’s Google account from their WordPress profile?
    If you open any user profile that has used Sign in with Google, there will be a Sign in with Google via Site Kit by Google section. Click on the Disconnect Google Account to remove their Sign in with Google connect.

    Note that if that user profile remains active and the email associated with that user matches their Google account, the user you disconnected from Sign in with Google will still be able to login once more.
  • I’m encountering a “Couldn’t create project error”?
    You may have exhausted your total number of projects that you can create. There is a limit to the number of Google Cloud Projects. If you have reached your limit, you can review any projects that you may wish to delete. It does take some time once a project is removed from your Google Cloud Platform. Once projects are deleted, it takes 30 days before it’s fully relieved and unrecoverable. You’ll find more information on this here.

    If you reach your quota limit, you can request an increase of the total projects limit.

    Another option is to configure Sign in with Google using another account.
    Another “Couldn’t create project” error you may encounter is references to a “Cloud Resource Manager project creation is disabled” mention. This indicates that you’re a Google Workspace user and the Google Cloud Platform service is not enabled by your administrator.

    Contact your Google Workspace administrator and inquire about this service.
  • What happens if I change a user’s email from their user profile in WordPress? Will they be able to Sign in with Google?
    A message to state that the user is not a registered user will appear. This is similar to what happens if a user tries to login with a username and password when the username does not exist.
  • What happens if a user logs in with their Google account, but they’re not a registered user and the option to “Allow registrations” is not enabled?
    A message to state that the user is not a registered user will appear. This is similar to what happens if a user tries to login with a username and password when the username does not exist.
  • It’s stating that “The user is not registered on this site”, but I added this user. 
    Ensure that the email associated with the Google account they’re trying to login with matches the email defined in their user settings. 
  • What happens if there are two user profiles that have the users email as the same Google account?
    In WordPress, users can’t define the same email for more than one user. A message will appear if you try to use the same email associated with another user. 
  • What role are users defined as if using Sign in with Google
    This is defined by your WordPress general settings. Subscribers is the default WordPress role but this can be changed. This is what SK will use. 

More Resources