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

7 Ways to Grow Your SaaS Startup Faster

Every startup looks for ways to catapult a business to success. Here are some tips for accelerating growth for SaaS (software as a service) companies. 1. Start charging early SaaS startups are often hesitant about charging customers. They think that their product is not yet ready, that it’s necessary to get traction and focus on expanding their customer base rather than on growing revenue. Deep inside, however, they often don’t just have enough faith in their product and are not sure if someone will buy it at all. They prefer keeping hundreds or thousands of free users to attempting to win a few serious customers. Big numbers are comforting but the product remains an unverified idea. Building a product should imply increasing revenue. So don’t hesitate too much—put it to the test by charging and see if it works in the real conditions. This is one way to minimize your risk too. Instead of waiting to launch until you’ve invested huge amounts of time and money, launch early. If...

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...

7 Best WordPress Job Board Plugins and Themes

Are you looking for the best WordPress job board plugin? There are several WordPress job board plugins that you can use to easily create a job board and charge other companies to post jobs. It is one of the ways to make money from your blog , and you can even use it to post your own job openings. In this article, we have picked the best WordPress job board plugins and themes that you can use. Building a Job Board Website with WordPress WordPress is currently one of the most popular website builders in the market, powering more than 30% of all websites on the internet. It can be used to build almost any kind of website including a job board website. There are two types of WordPress websites which often confuses new users. First, there is WordPress.com which is a hosted solution. Second, you have WordPress.org also called self-hosted WordPress. See our article on WordPress.com vs WordPress.org for a side-by-side comparison. We recommend using self-hosted WordPress.org because it g...