Skip to content
Wordpress, WooCommerce, Php, Html, CSS
  • Home
  • Tutorials
  • WordPress Courses
  • Plugins
  • Showcase
  • News
  • Contact
How to add one-click login with Google in WordPress

How to Add One-Click Login With Google in WordPress

November 27, 2020 by admin

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.

Categories Plugins Tags gmail login in wordpress, how to add one-click gmail login, how to add one-click gmail login in wordpress, one-click gmail login, one-click gmail login in wordpress
Post navigation
27 “Proven and Easy to Start” Online Business Ideas that Make Money
18 Most Important Things You Need to Do After Installing WordPress

Product Highlight

This first widget will style itself automatically to highlight your favorite product.

Learn more

Recent Posts

  • Theme File Duplicator Admin PreviewHow to Duplicate Theme Files from WordPress Admin Panel
  • Drafts Dropdown Plugin PreviewHow to Easily Access Your Draft Posts from the WordPress Admin Bar
  • How to Embed an External RSS Feed in WordPress Posts via Shortcode
  • How to Show Hidden Custom Fields in WordPress
  • WPBeginner will be attending / speaking at WordCamp Louisville 2011

Follow Me

  • Facebook
  • Twitter
  • Instagram
  • Privacy Policy
  • Terms
  • Contact
© 2021 Wordpress, WooCommerce, Php, Html, CSS • Built with GeneratePress