In this tutorial, we are going to show you how to integrate visitor authentication into your website based on the Web Builder. We will use a third-party package for this and add a “Log in with Google” button to the top navigation of your Web Builder application.
To follow along, authentication via Google needs to be set up first in your Google account and for your Web Builder. For details on how to accomplish this, see Setting up Identity Providers for Your Website. It’s easy.
All that’s needed here is the ID of your authentication client at Google.
The package we will be using is react-google-oauth, which has been derived from react-google-login. It provides us with an API component as well as customizable log-in and log-out components. Events allow us to make logged-in visitors known to the Web Builder. Only then, restricted content will be made available to those visitors.