In this tutorial, we are going to show you how to integrate visitor authentication into your website based on the Interface Builder. We will use a third-party package for this and add a “Log in with Google” button to the top navigation of your Interface Builder application.
To follow along, authentication via Google needs to be set up first in your Google account and for your Interface 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 Interface Builder. Only then, restricted content will be made available to those visitors.