Skip to main content
Google SSO template

Find out what Google single sign-on method is and how to set it up in your application.

Betty Blocks avatar
Written by Betty Blocks
Updated over a year ago

Warning!

This is a legacy document. The features described below are only usable within the classic generation environment.

Do you need an application template with the same or similar functionality? Follow this link to leave a request!

After reading this article you’ll know how to:

  • Create an application with a Google sign-on login method

  • Set up SSO configurations

  • Use two main login methods

Description

Single sign-on (SSO) is an authentication method that allows users to securely log in to different services using a single ID. Using SSO means a user doesn't have to sign in to every application. With SSO, they can access all needed applications without being required to authenticate using different credentials.

Google Account SSO allows existing Gmail and G-Suite users to sign on. When you enable SSO, users are redirected to an external identity provider (IdP) to authenticate. This IdP will be the system of record for authenticated users. You don’t need to synchronize passwords to Cloud Identity or Google Workspace.

This template is meant to kickstart you with the implementation of Google single sign-on. It also has a standard login and registration workflow built-in. The documentation will help you configure the last steps to get it up and running.

Use of template

The Google SSO is useful not just for users, but for administrators of websites and applications who can control access to their applications and their level of security by setting multi-factor authentication, for instance.

Practically, using Google SSO might also increase conversion rates, that is increase the percentage of users or website visitors as Gmail is certainly one of the most popular personal email services.

Pages overview

  • Home. The homepage of your application.

  • My Account. The page to edit your personal information and update your password.

  • SSO Redirect Page. This page redirects you to the Google SSO login page.

  • User Login - Create New Account. The page to create a new user’s profile.

  • User Login - Login. The start page of your application via which registered users can log in using their credentials.

  • User Login - Password Reset Request. Using this page you can request to reset your password; a special link will be sent to your email address

  • User Login - Reset Password. The page with reset password form; here users can create a new password.

Getting started with Google SSO template

Creating application

Open My Betty Blocks and see your dashboard with suggested application templates in the ‘Start building’ section. Choose ‘View all templates’, then find the Google SSO template and click ‘Use template’.

Note: If you want to see the template’s live preview, click on its thumbnail, and in an open window find the ‘Live preview’ button.

The next steps will include coming up with a name for your application and setting a value for the application ID configuration. Find out why you need this setting and how to configure it properly in the Introduction to application templates article.

Configuring SSO

In the next step, you will need to configure your SSO settings before everything will be up and running. To do this first you have to click on ‘Back office’.

Then you need to select the 'Google SSO' view (1). There should already be one record present, select it (2). Then click the ‘Configure SSO’ action (3).

In a pop-up window, the three values need to be filled in:

App id: The unique identifier you gave your app. This is the same as you fill in before at the configurations tab.

Client: A client ID is an identifier associated with an application that assists with client/server authentication.

Secret Key: The client secret is a key that is used to encrypt exchanges between the server and the client.

The first one is your already known application ID, the next two can be found and retrieved from your Google admin console.

Open Using OAuth 2.0 for Web Server Applications in Google’s documentation. Here, in the ‘Create authorization credentials’ section, you will find some steps on how to get the credentials we need from Google. In other words, you need to enable Betty Blocks on your Google side, because Betty Blocks already set up an API for Google.

Besides the link above, there is a video that covers this topic. Follow the instructions and come back to the Back office to finish setting up.

Once you’ve set up everything on the Google Cloud Platform, it’s time to copy the needed values to our SSO configuration.

Open the generated OAuth client credentials and copy them to your SSO configuration values fields. It is also recommended to save them somewhere separately in case you need them in the future.

Click the ‘Execute’ button to save the configuration.

User login methods

Everything is set up and now we see that this template offers two ways to login:

  • Standard login method: using an email and password

  • Single sign-on login method: the one you have just configured after following the documentation

Standard login

This way to log in is done using the email and password fields on the login page. New users can be created by clicking on the ‘Register new account’ and filling it out.

This user will be able to log in with their email and password.

Note: If you use the email address for this method, it cannot be re-used anymore for an SSO login.

Single sign-on login

The SSO login is processed by pressing the ‘Google login’ button on the login page. The user will be redirected to the Google sign-in page. Here the user can log in with their corresponding account.

After the first successful login, a new user will be created in the application.

Additional Resources

Did this answer your question?