Bravo Studio Help Center
  • Get started with Bravo Studio 👏
  • Get Started
    • 🚀Create your first app
    • 🌟Bravo introduction
      • Get ready to create your app with ChatGPT
      • Create an app
        • Creating an app with Figma
        • Creating an app with Adobe XD
      • Duplicate an app
      • Delete an app
      • Replace linked Figma file
      • The app page
      • Sharing your app
      • Add an editor to your app
      • Fonts
        • Adobe XD - Supported fonts
    • 📱Bravo Vision previewer
    • ✨Unlock power features to create interactive apps
    • 🎓Help and tutorials
      • 📖App guide tutorials
        • Sample app tutorial: Your first binding
        • How to build a Fitness app with Bravo, Xano and RevenueCat
        • Foodgram: Social content sharing
        • Expedition journal: Write and share your adventures
        • My Subscriptions: Display data based on device ID
        • My Notes: using user ID and email from Firebase
        • My Store: Sell physical products with Bravo and Stripe
        • Titan: How to create a Smart Home App with No-Code?
        • n8n: Building an expense tracking app in 10min
      • 📺Learn with videos
      • 📚Learn with articles
      • 🗃️Browse by app feature
        • Save or "bookmark" a page
        • Backend search with Airtable
        • Backend search with Xano
        • Nested lists (list within a list)
        • Create and edit user profile (Firebase + Airtable)
        • Skeleton loader
        • Create albums in your app with Bravo Infinite images
  • Set up your design
    • 🖌️Get your Figma ready for Bravo
      • 🗃️Structuring the design: the layer hierarchy
      • 🪄Bravo Tags: adding functionality to the UI elements
      • 🧱The container
        • Setting up a container on Figma
        • Setting up a container on Adobe XD
      • 📲App navigation
        • Setting up app navigation on Figma
        • Setting up app navigation on Adobe XD
    • 🔌Bravo plugin for Figma
    • 💾Sample design files
    • 🤓Best Practices
  • App components
    • 📒Bravo Tags Master List
    • 🚪Menus
      • Modal Menu
      • Modal pages
      • Tabs Menu
      • Pop Up pages
      • Slide Menu
    • 🍞Pages
      • Modal pages
      • Pop-up pages
      • Swipe page
      • Transitions page
      • Page reveal animations
      • Page tabs
      • 🔮Stateful pages
    • 📦Containers
      • Swipe to delete
      • Top bar
      • Carousel slider
      • Aspect ratio relative to screen
      • Sortable List
      • Layer (sticky element)
    • 👋Intro & Onboarding
      • Intro page
      • Post-login page (Onboarding)
    • ⌛Loading experience
      • Loading page
      • Custom loading page
      • No loading
      • Preload
    • 📝Form & input fields
      • 👁️Password Visibility Toggle
      • 🩷Stateful input
        • ☑️Checkboxes (Multiple select)
        • ✅Required Checkbox
        • 🔘Radio buttons (Single select)
      • ⏳Input time Interval
      • 📄Dropdown selector
      • 🎚️Slider control
      • 🗓️Calendar picker
      • 📄Send form input to a database
    • 💎Components
      • Autoplay Video
      • GIF
      • SVG Component
      • Web view
      • Web Components using AI
      • Web view communication
      • LottieFile
      • Lottie-animated component
      • Flexible text (Flexo)
      • Zoomable image
      • Component states
      • Stateful component (like button)
      • Setting up the backend of Stateful component (like button)
      • Haptic Feedback (Buzzz)
      • Progress bar
      • Rich text
      • Date, Time and Currency Formatter
      • Scrollable text
      • Text Lines & Truncation
      • Status bar
    • ⚡Mobile actions
      • Mobile Actions
      • Play audio
      • Record audio
      • Play video
      • Scan QR code (external URL)
      • Scan codes (remote action)
      • Search & filter
      • Refresh page
      • Share location
    • 📱App Icon & Splash Screen
    • 🗺️Map with markers
    • 📈Charts
  • Data and Backend
    • 🗂️Set up a no-code backend
      • Xano
        • Nested lists (list > list > detail page) with Xano
        • Create a bookmark functionality with remote actions and device ID with Xano
        • Multi-user setup with Xano
        • 🔒Setting up the Xano Log in Snippet
          • ♻️Refresh Token
      • Airtable
        • Nested lists (list > list > detail page) with Airtable
        • Sort list with Airtable
        • Connect multiple tables from Airtable to one app
        • Update Airtable's API key to Access Token
      • Backendless
      • Bubble
      • Notion
        • Getting data from a Notion table
      • Firebase
        • Getting data from Firestore
    • 💾Set up API requests
      • Set up from scratch
        • Airtable
          • Set up an API GET request for list page - Airtable
          • Set up an API GET request for detail page - Airtable
          • Set up an API POST request - Airtable
          • Set up an API DELETE request - Airtable
        • Xano
          • Set up an API GET request for list page - Xano
          • Set up an API GET request for detail page - Xano
          • Set up an API PATCH request - Xano
          • Set up an API POST request - Xano
          • Set up an API DELETE request - Xano
      • Using GraphQL body type
      • Set up with API wizard & importer
        • Using the Airtable API Wizard
        • Using the Xano API wizard
    • 🎲Variables
      • Built-in variables
      • Set Variable
    • 📚Data Collection & Binding: Complete Collection
    • 🗂️Pagination
    • 🐛Debugging API issues
      • ⚙️Debugging requests in the API Collection
      • 📲Event logger
      • 🔗Link property
  • Data binding
    • 🤝Data binding types
      • API binding types
      • Bind multiple API requests to one screen
      • How to connect my API to a mobile actions
      • Remote actions: trigger an API request with a UI element
    • 💡Display data in your app
      • Bind data to design for a list page
      • Bind data to design for a detail page
    • 🆕Create data from your app
    • 🗑️Delete data from your app
    • 🚦Conditional Visibility
    • 🎛️Conditional Actions
  • Integrations & Settings
    • 🖇️Deep Links
      • 🖇️Deep Links for Bravo Vision
      • 🖇️Deep Links for published apps
      • 🖇️Troubleshooting Deep Links
    • 🔔Push Notifications with OneSignal
      • How to get a Bravo page URL
    • ⚙️Firebase Configuration
    • 🔐User Authentication
      • 🔑Authentication with Kinde and Xano
      • 🧙🏽Authentication with OAuth 2.0
        • Using social logins to authenticate users
        • Using AWS Cognito to authenticate users
        • Connecting to Spotify API
      • 📲User login with Firebase
        • ✉️Email and password Login with Firebase
        • 📞Phone Login with Firebase
        • 🍎Social Login with Firebase
        • 👻Anonymous Login with Firebase
      • ⛓️Authentication with custom backend
        • Set up Xano as your user authentication backend
    • 💰Stripe: One-time Payment
    • 💬Chat: CometChat
    • 💸RevenueCat: In-app purchases and subscriptions
    • 📉Bravo Analytics
    • 📳Facebook App Events
    • 📊Google Analytics
    • 🌐Multilingual apps
    • 🕸️How to connect with Webflow API
    • 📡NFC connection
    • 🎯Admob
  • App Publication
    • 🚀Publishing your app
      • iOS Publication: Complete Process
        • 1. Generate Certificates, AppIDs and Provisions
        • 2. Get the IPA
        • 3. Upload IPA to App Store Connect
        • 4. Test your app on TestFlight (optional)
        • 6. App Store publication
        • 7. Updating an app in the App Store
      • Android Publication: Complete Process
        • 1. Create a Keystore File (optional)
        • 2. Get the Debug APK to install
        • 3. Install the Debug APK in your device
        • 4. Get the AAB (Android App Bundle) file to publish
        • 5. Google Play publication
        • 6. Updating an app in Google Play
      • Android APK Installation Guide
      • Rejection from the app stores
    • 🎛️Making changes to your app after publication
    • 🛍️Versioning
    • 🌟App rating alert
  • Good to Know
    • 🤔Troubleshoot
      • Errors when logging in
      • Errors when creating an app
      • Errors in API requests
        • Request timeouts on Bravo
      • Errors after importing
      • Errors in publication form
    • 🧑‍💻Manage your account
    • 💳Billing
      • Bravo Subscription Plans Overview
      • App Add-ons
      • Upgrading a plan
      • Downgrading a plan
      • App allowance
      • Invoices & payment method
      • FAQ
    • ❓FAQs
      • About Bravo Studio
      • Importing a design file
      • Bravo Vision
      • Bravo Tags
      • API & Data Library
      • Login & Account
      • Other Features
  • NEED SOME HELP?
    • 📖Bravo Support Guide
    • 🤝Join the Bravo community
    • 🤖Bravo Assistant
    • 👥Production support
    • 🐞Report an issue
Powered by GitBook
On this page
  • 1. Setting up the UI
  • 1.1. Phone number page
  • 1.2. Confirmation code page (phone login - mandatory)
  • 2. Set up in Firebase
  • 2.1. Enable Type of Authentication
  • 3. Firebase Configuration in Bravo
  • 3.1. Firebase Services for Bravo Vision
  • 3.2 Firebase Services for published app

Was this helpful?

  1. Integrations & Settings
  2. User Authentication
  3. User login with Firebase

Phone Login with Firebase

Set up a user authentication system using Phone login with Firebase

PreviousEmail and password Login with FirebaseNextSocial Login with Firebase

Last updated 11 months ago

Was this helpful?

This guide covers how to set up a login page in Bravo using Firebase as the user management service. where users introduce their phone number, and get a SMS with a code they need to use to log in.

What is Firebase? is a backend-as-a-service (Baas) from Google that provides features for building mobile apps.

1. Setting up the UI

💾 Sample design file

Here's a sample design file that already contains all the necessary tags for this phone login feature. It contains the tags phone login and also email login. They can also be combined with .

1.1. Phone number page

In order to set up the phone login, use the tags below:

  1. [component:input-tel]: Indicates which field will be used as the user phone input. It needs to be a valid phone number, or a test phone number provided in Firebase.

  2. [action:login:firebase-phone]: performs the login action, needs to be added in the login button.

In this Bravo Sample, we use other Firebase login options, if you're using only the phone option as login, add the [page:login] tag to the login-phone screen.

After the login screen, the user will navigate to a screen where they need to input a confirmation code sent by email.

1.2. Confirmation code page (phone login - mandatory)

You'll need to create a page where the user will introduce a confirmation code received via SMS. The user will automatically navigate to this page after the login screen.

To set it up, add the following tags:

  • [page:login:verify-phone]: add this tag in the page-level component.

  • [component:input-number]: This will create a numeric input field for the confirmation code.

  • [action:verify-phone:firebase]: this action sends the confirmation code. If the code is correct, the user will navigate to the home page. Otherwise, an error message will be displayed, and the user will need to log in again.

For phone and social logins, there's no signup page - the login action will also create new accounts for first-time users.

Please note that phone logins are functional exclusively on the final versions of apps, either in the testing phase or when officially released. In Bravo Vision, you can engage in a simulation.

2. Set up in Firebase

2.1. Enable Type of Authentication

  1. After the project is created, click on Project Overview from the left menu and then select Authentication. Here is where your user accounts will be created and stored.

  2. Go to Sign-in method tab and select Phone from the Native provider options.

  3. Enable the phone toggle. As you'll see, you can add here some test phone numbers to log in - you'll need to provide a test confirmation code as well, that you'll be able to introduce in the login flow.

  4. Enable Anonymous login and do not forget to save!

3. Firebase Configuration in Bravo

Now, you need to obtain the Firebase configuration files (GoogleService-Info.plist for iOS and google-services.json for Android) and upload them to Bravo.

The purpose of this configuration file is to create a link between our app and this Firebase project. So, if in the future, you want to connect to another Firebase project, you can do it by uploading a new Firebase configuration file in Bravo for each mobile platform (iOS and Android).

Depending on your needs, you can either:

  • Set up your Firebase Login for Bravo Vision (recommended for prototyping and testing)

  • Set up your Firebase Login for your live or published app (recommended for publishers)

In case you want to configure both Bravo Vision and live app for iOS and Android, you will need 4 files in total:

  1. GoogleService-Info.plist for iOS Bravo Vision

  2. google-services.json for Android Bravo Vision

  3. GoogleService-Info.plist for iOS published app

  4. google-services.json for Android published app

3.1. Firebase Services for Bravo Vision

Here are the steps to follow if you want to get the configuration files for Bravo Vision:

3.1.1. Create an app and download the Config files for Bravo Vision

If you don't have any app created in Firebase yet, follow the next steps as you need to create new Firebase configuration files to upload them to Bravo Studio.

  1. Scroll down to Your apps section and click Add app.

  2. Choose a platform (iOS or Android) and do the following depending on the platform:

  1. Go to Project Overview (from the left menu), click the iOS symbol.

  1. In step 1, fill in the iOS Bundle ID for Bravo Vision: com.codelesslabs.app Leave the rest blank, and click Register app.

  1. In step 2, download the file GoogleService-Info.plist and click, Next to continue.

  1. The rest of the steps are not needed, so click Next for Steps 3 and 4.

  2. To finish, in Step 5, click Continue to the console.

  3. To verify that the app has been created, go to your Project Overview > General > Your apps.

  1. Go to Project Overview (from the left menu), click the Android symbol or Add an app.

  2. In step 1, fill in the Android package name for Bravo Vision: com.appfoundry.previewer Leave the rest blank, and click Register app.

  1. In step 2, download the file google-services.json.

  1. Click Next. The rest of the steps are not needed, so click Next for steps 3. In the final step, click Skip this step (or Continue to console if it's enabled).

Important: In case you want to set up phone login for Android, there are some security steps you need to complete in Firebase:

  1. You'll need to request an app bundle (the easiest will be to request a debug APK), in Bravo's Publish section. Even if you don't want to publish your app yet, you'll need this to obtain a valid SHA-256 code.

  2. To obtain this code, go to the History section after your bundle is generated, and copy the SHA-256 code.

  1. Once this is done, go back to your Firebase project. In the project settings, paste this code in the section shown below, inside the Android app you previously created and download the google-services.json.

  1. Finally, you'll need to set up the SafetyNet option. To do that, go to Build -> App Check in the side menu. Then, select SafetyNet, enable the checkbox (the SHA code should already be there), and click Save.

3.1.2 Upload the Firebase Config files in Bravo

  1. Once having the Firebase configuration files, go back to Bravo Studio, open the App project that has the login (or import your design file if you haven't yet) and click on the Integrations tab.

  2. Navigate to the Login option in the left-hand sidebar and Enable the Firebase toggle.

  3. Once enabled, the Bravo Vision tab will be selected by default. Click on the Configure button to upload the Firebase files in the corresponding fields. It is also possible to do so from Firebase Config.

  4. After uploading the files, do not forget to Save the changes. You must have a green check in order for that integration to work correctly on that platform you're setting up. If you're not setting up Firebase in a certain platform, you can ignore the warning icon.

  5. Your app is ready to test! Open Bravo Vision to test out the login pages.

On Bravo Vision, every time the app is opened, login will be required. This won't happen on the published app, where the session will be maintained until the user chooses to log out.

3.2 Firebase Services for published app

Once you are ready to publish your app to the stores, you need to create new Firebase configuration files with the final bundle ID (for iOS) and package name (for Android) and upload them to Bravo Studio.

3.2.1. Create an app and download the Config files for the live app

If you don't have any app created in Firebase yet, follow the next steps as you need to create new Firebase configuration files with the final bundle ID (for iOS) and package name (for Android) and upload them to Bravo Studio. Otherwise, add the missing params we mention:

  1. Scroll down to Your apps section and click Add app.

  2. Select a platform: iOS or Android.

  3. Register the app and do the following depending on the platform:

Where do I find the final Bundle ID (for iOS)?

For iOS, you'll need to set up Cloud Messaging in Firebase. This is found under Project Settings > Cloud Messaging > Apple App configuration.

Cloud messaging allows to be configured using an APNs Authentication Key or using APNs Certificates. Using authentication key is recommended, and also easier to set up.

To do this, inside the Developer Central, go to Keys and create a new one, of type Apple Push Notifications service (APNs):

Fill the KeyID, TeamID and upload the p8 file in Firebase settings, and that's it. The TeamID is displayed in the Membership page.

1. Where do I find the final package name (for Android)?

In case you're using phone login, there are some additional points to consider.

Android

So, for instance, in case you decide to have both a debug APK and a publishable AAB, you'll need to add the two SHA codes for those bundles to the Firebase project settings. Remember that you can add the SHA codes after downloading the corresponding google-services.json file - you don't need to generate a new one for every new SHA code.

After doing this, your app bundle will have a functional phone login in place! 🥳

3.2.2. Upload the Firebase Config files in Bravo

  1. Once having the Firebase configuration files, go back to Bravo Studio, select the App > Integrations tab > Firebase Config.

  1. Under "Activate Firebase services for final app", upload the Firebase files in the corresponding fields and do not forget to Save the changes.

  2. Firebase integration has been updated in this app. Please request a new build and upload a new version to ensure your published app continues to work properly.

In case you already have a published app bundle, and you change these Firebase assets, you'll need to generate a new bundle and publish an update to the stores.

Make sure to place the (Figma) or Home icon (XD) on the "Home" screen of your app (i.e. the first screen users will see after they have logged in).

Once you have the UI ready, it's time to manage user authentication in your existing Firebase project. If you haven't created your Firebase project yet, follow the steps provided .

After the user has logged in, a special will be created: ${user.id}. This built-in variable can be sent as part of an API request, to handle user-specific data in the database.

Enter your Bundle ID and App Store ID. Remember you need to complete to have these parameters ready.

When you have the necessary files for publication, use the same Bundle ID from the Bravo publication form for the final Firebase file. (Check how to on the app publication process)

4. In case you're using phone login, remember that you'll need to provide a SHA code for an app bundle in the Firebase settings, even if you'll only test in Bravo Vision for now. You can see how to do that. This SHA can be added in Firebase after downloading the google-services.json.

Once you generate your debug APK or AAB bundle, you'll need to add its SHA-256 code to the Firebase settings as indicated . Even if you did this before to test the app in Bravo Vision, you'll need to do it again for each app bundle you create and want to test (you can add many SHA codes to the same Firebase project).

Once completed, your app's login is ready to test! Open Bravo Vision or your Published app to test out the login pages.

🔐
📲
📞
🎉
flow start point
step 2 of the publishing process
set up the Bundle ID
here
here
Firebase
Firebase's Social Login
Bravo Sample: Login with FirebaseFigma
Sample design for email and phone login
here
variable
Logo
Figma with a Bravorized phone login screen
Enable Firebase Login from the App's Integrations tab
Upload the Firebase files from Firebase Config
Completed Firebase Config files for Android and IOS
Activate Firebase services in your final app
Register iOS app with iOS bundle ID