MARKETPLACE
PLUGINS
GS TIME BASE OTP GENERATOR
GS Time base OTP generator logo

GS Time base OTP generator

Published August 2025
   •    Updated August 2025

Plugin details

GS OTP Generator: A Comprehensive Guide
This guide provides a detailed overview of the GS OTP Generator (Time-Based One-Time Password) plugin, its functionality, and a step-by-step walkthrough on how to implement it within your application.

1. Introduction
The GS OTP Generator enables you to create a secure login flow where a user generates a time-sensitive, 6-digit code from your Bubble.io mobile app to log in to the corresponding web browser version of your application. This provides a convenient and secure way for users to authenticate with an additional layer of protection, as long as they have their registered mobile device.

2. Key Features
The plugin provides all the necessary actions to build this mobile-to-web login system:

Generate Secret Key: Creates a unique, cryptographic secret key for each user during their initial registration. This key is the foundation for generating and verifying all future OTPs.
Generate OTP: Produces a 6-digit OTP based on a user's secret key and the current time. This action is used on the mobile app side to create the code for the user to view.
Verify OTP: Compares a user-provided OTP against the expected OTP generated from their secret key, confirming the code's validity within a short time window. This action is used on the web app side to authenticate the user.
Optional Countdown Timer: The plugin also includes an optional countdown timer to visually show users how much time they have before the OTP expires and a new one is needed. This can be used if you don't wish to implement your own timer.

$25

One time  •  Or  $5/mo

stars   •   0 ratings
0 installs  
This plugin does not collect or track your personal data.

Platform

Web & Native mobile

Contributor details

Tony @ Empatech logo
Tony @ Empatech
Joined 2020   •   58 Plugins
View contributor profile

Instructions

VIEW SAMPLE CODE URL
https://bubble.io/page?id=otpgeneratorapp&test_plugin=1754362258935x181716293592285200_current&tab=Design&name=index&elements=bTHHP

DEMO PAGE
https://otpgeneratorapp.bubbleapps.io/version-test?debug_mode=true



3. How to Use: A Step-by-Step Implementation Guide
This section outlines the process for a Bubble developer to integrate the GS OTP Generator. The workflow is split into two main parts: the initial user setup and the daily login process.
Step 1: Initial User Setup (Web App)
This workflow is for when a user first registers or enables OTP login on the web app.

Generate a Secret Key:

Create a new workflow that triggers when a new user signs up or when an existing user chooses to enable OTP login.
Use the plugin action Generate Secret Key.
Save this secret key to the user's data record in your database. Create a new field, for example,
otp_secret_key
of type
text
on the
User
data type.
Inform the User:

Inform the user that their account is now set up for OTP login and that they will need to use the mobile app to generate a code for future logins on the web.
Step 2: The Mobile App (OTP Generation)
This is the workflow for how the mobile app generates the OTP for the user.

Retrieve Secret Key:

On a specific page in your mobile app (e.g., a "Generate Code" page), create a workflow that retrieves the
Current_User's
otp_secret_key
from the database.
Generate OTP:

Use the plugin action Generate OTP.
The parameter for this action is the
otp_secret_key
of the
Current User
.
The action will return a 6-digit OTP.
Display the OTP:

Display the result of the Generate OTP action in a prominent text element on the mobile app's screen.
Consider adding a message indicating that the code is valid for a short period (typically 30 seconds). You can also use the optional countdown timer included in the plugin to provide a visual indicator of the remaining time.
Step 3: The Web App (Login Verification)
This is the workflow for how a user logs in via a web browser using the OTP from their mobile app.

Login Form:

Create a login form on your web app that includes input fields for a user's identifier (like email or username) and an additional input field for the OTP code.
Login Workflow:

When the user attempts to log in, first retrieve the user's data (e.g., by searching for the user based on the email input).
If a user is found, use the plugin action Verify OTP.
The parameters for this action are:

Secret Key: The
otp_secret_key
stored on the retrieved user's data record.
OTP Code: The value from the OTP input field on the login form.
The action will return
true
or
false
.
If the result is
true
, the login is successful. Use the
Log the user in
action to complete the process.
If
false
, display an error message like "Invalid OTP. Please try again."
4. Best Practices for a Secure Implementation

Protect the Secret Key: The secret key is the most critical piece of data. Never display it to the user and ensure it's stored securely in your database.
User Interface (UI): Clearly communicate the mobile-to-web login flow to your users. On the web app, instruct them to open their mobile app to get the code. On the mobile app, make the generated code easy to read and copy.
Recovery Workflow: Build a "forgot password" or "lost mobile device" workflow that allows a user to disable or reset their OTP secret key after a multi-step verification process (e.g., email link, security questions).

Types

This plugin can be found under the following types:
Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
Containers   •   Productivity   •   Mobile   •   Technical   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble