Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Add One-Click Login With Google in WordPress

Do you want to add one-click login with Google to your WordPress site? Allowing users to login with their Gmail account saves them time because they wouldn’t have to remember their WordPress username and password. In this article, we will share how to easily add one-click Google login in WordPress.

How to add one-click login with Google in WordPress

Why You Should Add One-Click Google Login in WordPress?

Most internet users remain logged in to their Google accounts. This allows them to quickly access all Google apps like Gmail, Drive, Docs, Photos, and more without signing in separately for each app.

Having one-click Google login activated on your WordPress login page allows your users to quickly sign-in to your website using their Gmail account. It saves them time, and they wouldn’t have to enter their login credentials each time.

If your organization uses GSuite for professional business email addresses, then your team members can use your organization’s Google apps accounts for login.

If you run a simple WordPress blog, then you might not find this feature useful. However single sign-on feature like one-click Google login is very helpful for any websites that require users to login such as multi-author websites, membership websites, and websites selling online courses.

That being said, let’s take a look on how to easily add one-click login with Google to your WordPress website.

Adding One-Click Gmail Login in WordPress

First thing you need to do is install and activate the Google Apps Login plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to go to Settings » Google Apps Login page in your WordPress admin area. Under the Main Setup tab, you’ll need to add Client ID and Client Secret code.

Apps login settings page

To get these details, you need to visit Google Developers Console. If you are not already logged in, then you will be asked to login with your Google account.

Next, you need to click on Start a project from the top menu. It will open a popup where you would click on New Project button to continue.

New project

Now, you need to add a project name and select the location. Project name can be anything, and Location will be your organization’s domain name (example.com). If you are logged in with your company’s Google account or your GSuite account, then it will add the location and organization automatically.

Project, location, and organization name

However, if you are creating a project from your personal Google account, then you can leave the location with No Organization selected.

Project name and location

Next, click on the Create button to continue.

You’ll now be redirected to APIs & Services dashboard. On this page, you need to click on Credentials from the left menu and go to OAuth consent screen page.

In the Email Address field, you need to add your email address that you have used to create this project. Also you need to add your website URL in the Homepage URL field and click on the Save button.

OAuth consent screen

After that, it will take you to the Credentials page again. Go ahead and click on the Create Credentials button to select OAuth client ID option.

OAuth client ID

Next, you need to select Web application as an Application type. In the Authorised JavaScript origins field, you need to enter your website URL (http://www.example.com), and add WordPress login page URL (http://www.example.com/wp-login.php) in the Authorised redirect URLs field.

Web application type

After that click on the Create button, and you’ll see your Client ID and Client Secret information in a popup.

Client ID and Client secret

You need to copy and paste these keys on the plugin’s settings page in your WordPress admin area.

Add client ID and client secret in WordPress

After that, you can simply logout from your WordPress admin account, and you’ll see a Login with Google button on your login screen.

Login with Google

Clicking on the button allows you to login with one-click into your WordPress account. However, keep in mind that users can only login with the Google account address that they have used on your website.

We hope this article helped you learn how to add one-click login with Google in WordPress. You may also want to see our guide on how to create a login popup modal in WordPress, and how to create a custom user registration form in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

8 CommentsLeave a Reply

    • You would want to reach out to the plugin’s support and they would be able to let you know how it interacts with WooCommerce at the moment.

      Admin

  1. Can you implement this to a individual page? For example, I have a free trial sign-up page that I want users to fill out their info, could I use this to auto sign-up w/ google?

    • Sadly, for a question like that, you would need to reach out to the plugin’s support for excluding pages from being affected by the plugin.

      Admin

  2. i get this message. user name has been marked as spam
    i tried many accounts same issue
    any suggestuins

    • If it is your site then you likely are using a plugin that is adding that message and you would need to go through your plugins to find the root cause. If on a different site then you would need to reach out to that site’s support and let them know about the message

      Admin

Leave a Reply to WPBeginner Support Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.