VIEW SAMPLE CODE URL
https://bubble.io/page?id=authenticatortest&test_plugin=1750130965990x105416452492754940_current&tab=Design&name=index&elements=bTGYfDEMO PAGE
https://authenticatortest.bubbleapps.io/version-test?debug_mode=trueSetup and Plugin Installation
Bubble.io Account and App: Ensure you have an active Bubble.io account and the application where you want to implement 2FA.
Go to the "Plugins" tab in your Bubble editor. Search for "GS google authenticator"
Workflow Plugin Action
GenerateSecret (Appname & Email address)
*Input the Appname and Email to be displayed in Google Authenticator
*To create a unique secret and QR code for each user.
Returned Value
secret - unique secret for each user.
qrcodedataurl - QR code Image to be used for scanning in Google Authenticator
After calling GenerateSecret plugin action the secret and qrcodedataurl will be generated
Store this secret key securely in your User data type (e.g., a new field called 2FA_Secret_Key)
Display QR Code: Set the image element's dynamic image to the QR code generated in the previous step.
Display Instructions: Provide clear instructions to the user to open Google Authenticator (or any compatible app),
tap "Add Account," and scan the QR code.
Workflow Plugin Action
CheckPin (PIN & SECRET)
*Input the PIN displayed in Google Authenticator
*Pass in the SECRET from user
Returned Value
isvalid (YES if PIN is valid) (NO if PIN is not valid)