Google One Tap Plugin

Introduction

Google One-Tap for web & mobile. The closest thing to no password yet.

Prerequisites:

For using the plugin you'll need to get the API credentials with Google . Create your development account at : https://console.developers.google.com

How to setup

I. Setting up the Google developer side

  1. Sign in to Google Console : https://console.developers.google.com
  1. Access “API & Services”
  1. Go to the “Credentials” tab and create an OAuth Client ID.
  1. In “OAuth 2.0 Client IDs” list click to your created OAuth ID’s name. Add your redirect URls in the same fields.
Image without caption
5. Past the Authorized Javascript origins URIs (your domain) (e.g. https://domain.com) 6. Copy Client ID and which will be pasted in plugins settings field, ClientID.
Note: Remember to save all you settings in Google Console

II. Setting up the plugin on the Bubble side

7. When you've got your clientID from Developer Account, place it in plugin settings fields as shown:
Image without caption
8. Next place the Plugin element on in the Design Tab in bubble editor:
Image without caption
9. Use the element proprieties to create your logic.
10. Done!

Plugin Element Proprieties

The plugin contains Google One Tap element that should be used on the page in order to set up the authentication process.
Image without caption
Proprieties fields:
  • Request "one tap" on page load (checkbox): If checkbox is checked the sign-in prompt will be displayed on page load.
  • Enable autoselect (checkbox): If checkbox is checked it will enable automatic selection of an account. Note: Only for one logged in the browser account.
  • The DOM ID (string): The DOM ID of the container (use only Group visual element!) element. If not set, the One Tap prompt will be displayed at the top right corner of the window.

Element Actions

  1. One Tap Action Google One tap - this action is used to request one tap signin.
Proprieties:
- Enable autoselect - If checkbox is checked it will enable automatic selection of an account, if there is only one - Context - You can choose one of three contexts for the One Tap prompt header: signin: "Sign in with Google.", signup: "Sign up with Google.", use: "Use with Google." - The DOM ID - The DOM ID of the container (use only Group visual element!) element. If not set, the One Tap prompt will be displayed at the top right corner of the window.
2. One Tap Validate token - this action is used to validate user token and retrieve user email / name.
Proprieties:
(param.) id_token - parameter value obtained from google one tap's element state

Element Events

  • A Google One Tap User Login - this event can be triggered when the plugin has received a Token ID

Element States

  • Google One Tap's Token ID: returns value of user's token ID

Workflow example

For this plugin example, we'll show user validation to get information about it using validate token action and google one tap login event.
  1. Create the event When google one tap is login
Image without caption
2. Add action One tap - Validate Token using one tap's token ID state to validate the user
Image without caption
3. Retrieve the information about the user (ex: name, email, or picture) in a custom state
Image without caption
4. Done.
Image without caption

Changelongs

Update 07/11/20 -
  • Added new element "Google One Tap" and deprecated "One Tap Signin" element

Demo to preview the settings