Learn Bubble with 500+ tutorials, courses & AI Assistant ✨

Limited time launch offer get $80 off today

0 days 0 hours 0 minutes 0 seconds
SAVE $80 NOW
Planet No Code logo
Bubble.io CoachingFounder MentoringSponsorships
LoginLearn Bubble.io

How to securely generate a verification code

In this Bubble.io tutorial video we demonstrate the right and secure way to generate a verification code. Remember that any data used in a front end workflow can be accessible to the user so we need to use backend workflows to complete this task.

Join now $19/monthLearn more
Get 500+ tutorials, a No-Code AI Assistant, 4 premium courses, and everything you need to build faster!
How to securely generate a verification code
Explore these topics...
Design
Database
Workflow
Backend Workflows
Privacy
Magic Links

With just this tutorial learn...

Secure verification made easy: Learn how to generate and check codes without compromising user data. Enhance your app's security with this essential Bubble tutorial.

Unlock backend workflow power: Discover how to create robust verification systems using Bubble's backend workflows. Protect your users' sensitive information like a pro.

Master the art of secure code generation: From email verification to SMS authentication, learn how to implement foolproof security measures in your Bubble app.

With membership you'll...

Learn how to build a ChatGPT Clone, Custom CRM for your business & SaaS Marketing website with Webflow & AI.

Unlock 500+ Bubble tutorial videos with AI powered Q&A.

Debug your Bubble app instantly with our custom trained No Code AI Assistant.

Join now $19/month
Risk-free! 14-day money-back guarantee. Cancel anytime.

Securely Generating Verification Codes in Bubble

In this Bubble tutorial video, I'm going to demonstrate how to generate a verification code for your users and check that verification code in a secure way. The trouble is, it can be really tempting to generate this code in a front-end workflow, but this means that with the browser developer tools and a skilled user, they could access this code regardless of whether they receive it via email or SMS, therefore making it basically useless and completely insecure. So I'm going to demonstrate how we can use a back-end workflow to securely check a verification code without the user actually getting access to that code.

Setting Up the Form

To do this, I've got a simple form set up here where I'm going to enter an email address and then a form to check it. And I'm running my app and I'm logged in as one of my users. In fact, I'm going to add in a text label here, a current user email, so that that's really clear what's going on. Refresh that. So you can see that I'm logged in as a demo user. And in fact, what I can then do is start creating a workflow for when this button send is clicked.

Using Bubble's Pre-built Features

Now remember that Bubble actually includes a number of pre-built abilities to do something similar to what I'm going to demonstrate here. You can generate Magic Links using a Magic Link workflow action. You can verify an email address using an existing template in Bubble. So there's no need to create unnecessary work and potentially additional security flaws if you're trying to do Magic Links or you're just trying to verify an email address.

Creating a Custom Verification Process

This is if you're wanting to add an additional level of security or you're simply just wanting to generate a code and check that code against the user based on whether they've received that in an email or they've received an SMS. So I'm going to demonstrate how to do that with an email.

Setting Up the Backend Workflow

We need to create a new workflow and we then need to go into back-end workflows and create a new workflow and we shall say generate and send code. It's not going to be public and into this we're going to pass a user. And what we will do is we will generate a unique six-digit code and save it to the user.

Generating the Verification Code

So we'll go for make changes to the current user and say verification code of type text and then we'll go calculate formula, generate a random string, number of characters, six use numbers, six-digit codes with numbers. But we need to protect this because again we don't want the users access this simply because they're logged in.

Configuring Privacy Rules

So we'll go into data and we'll go to privacy rules and user and we'll untick view all fields so that the user can only view the essential fields. Some of these ones are previously set up. Basically all but verification code because we don't want the user to actually be able to view the code.

Sending the Verification Email

So make changes, generate the code. This is done on the back-end so the user can't view this workflow step and then we will just send an email. No, not that one. Just the regular send an email and we'll send it to user email.

Handling User Context in the Workflow

Now I've sort of a little bit messings up here because here I'm referring to current user whereas here I'm sending to the user that I'm placing into the workflow. Now because the user who is trying to get through this verification step, they are current user and they trigger this workflow directly, they are still current user from the perspective of this workflow. So I could actually here say current user email and then I'll say here is your code and I'll say current user verification code.

Ignoring Privacy Rules for Workflow Execution

Now I'm not sure that that is actually going to be accessible unless of course I say that privacy rules are ignored in this because we can write data into a field that we don't have read access to but then we actually require reading the field when we get to this step. So I think this is better run although precautions should be used when ticking this box ignore privacy rules when running the workflow. I think we need it in this instance and so that's going to send an email with the verification code and to link that up to the front end, we add in a workflow action and we go schedule an API workflow, generate and send code, schedule date, we'll just send it right away and then the user is current user although we've actually ended up not needing that field because we've just referred to current user throughout in the backend workflow.

Verifying the Code

Now I'm going to skip all those steps here you'd want to provide visual feedback, you'd want to write a prompt say check your inbox wait five minutes that sort of thing for time I'm going to skip that and move straight on to how we would verify the code. So when it's verified we will want to run another backend workflow again we have no way of checking the code unless the user can read the code so we have to run it in a backend workflow.

Setting Up the Verification Workflow

Whoops not that one backend workflow and so we shall say check code and again we want to run it without privacy rules and this time we will need to pass in user or do we? We can still run it as current user but I think we can run this current user let's just try that.

Invitation to Explore More Content

Hey guys if you're finding these YouTube tutorials helpful we invite you to explore even more content on our website at planetnocode.com. We have a large selection and variety of super in-depth and detailed video lessons there created and curated just for our pain members. It's all about learning together and accelerating your no code journey. Check us out at www.planetnocode.com and let's continue building without limits.

Implementing the Verification Logic

And so we shall say make changes to a thing no make changes to current user and we'll say verified yes no and we'll say they're verified yes if ah we need a filter to pass the code in. We'll say code is text and then we'll say only when code is current user verification code. Okay so I'm having to create an additional field which is accessible to the user, verified. In fact if I go into data I'm going to need to make it visible now. Remember verification code is not visible or readable to the user. And so this step will check the code and change it to verified.

Adding Visual Feedback

So I can add in some visual feedback on my page. So I can add in the text here and I can say current user verified. And if I preview that, in fact I shall say format of this text, we'll say verified not verified. Okay so it's printing not verified.

Testing the Verification Process

So let's test this. In actual fact the way I've set this up I don't need that input. So we'll click send. And so the backend workflow for generating the code and sending the email is now triggered. And we can check that by going into app data and seeing that the verification code is there. Now we as the app creator or as an editor can view this. But in fact we will really thoroughly test my plan here. I'll say current user verification code and we'll check to see whether that is visible. Hopefully it's not. Yeah it's not visible.

Finalizing the Verification

Okay so then if I go into app data and I copy the code, I can paste it into the field here, click verify and make sure that my button verified is clicked actually runs the workflow. I forgot that. So we run a schedule API workflow, check code, we run it right away and we put in the inputs code. So it's running the backend workflow and you can see now it's changed to verified. And although it is running a backend workflow it is almost instant.

Improving User Experience

So again you'd want to add in some visual clues and visual cues of what's going on to help your user to avoid them having to say spam the button and then they get 10 verification codes in their inbox. So there's lots more to cover. But I simply wanted to highlight the fact that this needs to be run in the backend workflow and you need to have those privacy rules established so that the user with the browser tools with a little bit of skill can't access the codes and therefore make the whole sending of it whether email or SMS completely null avoid pointless.

Conclusion and Next Steps

Right if you would like to check out more videos you can head to our website planetnocode.com. If you would like some one to one support with your Bubble app you can head to also planetnocode.com and you can book a Zoom call with a Bubble coach and we can work on your app together. We can troubleshoot anything that is delayed in the development of your amazing startup.

Table of contents

Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Your No-Code Journey Starts Here

The best way to learn Bubble.io?

Build No Code Confidently

No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.

Find every solution in one place

No more searching across platforms for tutorials. Our bundle has everything you need, with 500+ videos covering every feature and technique.

Dive deep into every detail

Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.

Monthly
Yearly
Member
Accelerate your Bubble app to launch
$99 / month
$19/month/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now
Member
Accelerate your Bubble app to launch
$990 / year
$149/year/mo
Includes:
500+ tutorials
4 premium courses
Find the right tutorial with our custom trained AI
New tutorials added each week
Cancel anytime
14 day money back
Join now

Frequently Asked Questions

Find answers to common questions about our courses, tutorials & content.

Do I need any coding experience?

No. Our Beginner Essentials course and AI No-Code Coach are designed for total newcomers. You’ll learn Bubble.io step by step - no coding required.

How does the AI No-Code Coach work?

Simply type your question in plain English, and our AI taps into the entire video library to recommend the exact lessons you need. It’s like having a personal instructor on demand.

How long can I access the content?

As long as you’re subscribed! With our monthly subscription, you get unlimited access to all 500+ videos, our growing course library, and the AI No-Code Coach.

What courses are included

Your subscription includes:

  • Bubble Beginner Essentials – Get up and running fast.
  • Build a ChatGPT Clone – Integrate AI into your no-code apps.
  • Build Your SaaS Website with AI – Learn to create a scalable startup site.
  • Develop a Custom CRM App in Bubble - Learn database relationships with a CRM.

Plus, new tutorials every week!

What if I get stuck on a lesson?

The AI No-Code Coach is your first stop for instant answers. If you need deeper help, you can book 1:1 Bubble coaching for expert guidance.

Do you offer a money-back guarantee?

Yes! If you don’t see real progress within 14 days, let us know, and we’ll issue a full refund—no questions asked.

Can I cancel anytime?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

What if I want more than just tutorials & courses?

Absolutely. Your subscription is month-to-month, and you can cancel anytime—no lock-ins, no hidden fees.

If you’re serious about building a successful SaaS startup, check out Mastery—our intensive mentorship program. Mastery goes beyond Bubble.io development and includes:

  1. 1:1 mentorship to fast-track your progress
  2. Marketing strategies tailored for no-code founders‍
  3. Product management insights to scale your startup‍
  4. Personalized support from experienced founders

‍

Still have questions?

Reach out to our dedicated team.

Contact
Services
Search Bubble TutorialsBubble.io CoursesBook Bubble.io CoachingApply for Mastery
Latest Bubble tutorials
Rerank Text By MEANING With Cohere In Bubble.io Step by Step!
Unlock RAG Providers for NO CODE AI App Development TODAY!
Better Tables with Built-in Search and Sort By in Bubble.io
Partnerships
Flusk.eu
VectorShift
Comnoco
Plumb
Toddle
Whereby
Get started with no code
AI Powered No Code AppsNo Code Web ScrapingBubble.io Plugin tutorialsBubble API Connector tutorialsStudent & Teacher DiscountBest tools for no coders
Follow us
Youtube
X
LinkedIn
Planet No Code logo
In partnership with
Queen Mary University of London Logo
© 2024 Planet No Code. All rights reserved.
Privacy PolicyTerms of ServiceCookies SettingsContact Us