Skip to main content

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.

The post How to Add One-Click Login With Google in WordPress appeared first on WPBeginner.

from: WPBeginner
via Editorial Staff

Source: How to Add One-Click Login With Google in WordPress Via Business Advice.

Comments

Popular posts from this blog

How to Add Web Push Notification to Your WordPress Site

Do you want to add push notifications to your WordPress site? Push notifications allow you to send notifications to users even when they are not visiting your website. In this article, we will show you how to easily add web push notifications to your WordPress site. We will also talk about the best WordPress push notification plugins and how to send desktop & mobile push notifications from your WordPress site. What is Push Notification? Push notifications are clickable messages displayed on top of user’s desktop or notification area on their mobile device. They can be shown even when the user’s browser is not open. Aside from desktop, web push notifications also work on mobile devices. This allows you to reach your users across devices with latest updates and offers. Web push notifications have proven to be a very effective way to convert website visitors into customers and loyal followers. Why Add Web Push Notifications to Your WordPress Site? We have already discussed tha...

5 Things You Should Know about Purchasing a Company Vehicle

  Many businesses require a vehicle to do business. It transports both goods and people from point A to point B and allows you to keep business dealings in-house. However, choosing a good company vehicle can be somewhat complex. You shouldn’t take the decision lightly. Here are a few things you should know before you buy a vehicle for your business: Accidents can happen, placing liability on you. You might think that an accident won’t happen if you hire drivers with a good track record and write a rule-book with strict policies and procedures. These are good tactics for mitigating some of the risks associated with commercial car accidents, but they won’t protect you completely. More than two million car accidents happen each year. Many of them are commercial truck accidents, costing millions in damages. Since commercial drivers are on the road more than personal drivers, they’re significantly more likely to cause an accident. Understanding the liability that’s placed on yo...

5 Essentials for Starting a Business in 2019

Is 2019 the year that you finally start your own small business or startup? There are a lot of good reasons to consider starting your company this year. You can do it. You don’t necessarily need a degree in business or finance to be successful. But keep reading—there are a few essentials for getting up and running that you won’t want to miss. 1. A great business idea If you’re kicking around a few ideas for your new company, or you think you have a concept but aren’t sure it will work, use these resources to help you think it through before you invest a ton of money and time. Validate your best ideas Our guide to coming up with a great business idea is packed with ideas for all kinds of industries. This article on generating hundreds of business ideas is a great place to start. When you’ve settled on one (or a few) favorites, download our free Business Idea Validation Checklist , which is an excellent tool for making sure your idea has legs before you invest any more time or...