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
  • Importing the Xano setup
  • Importing the design file
  • Creating the API collection and requests
  • Setting up the user authentication flow
  • Binding the API requests to the app screens

Was this helpful?

  1. Data and Backend
  2. Set up a no-code backend
  3. Xano

Multi-user setup with Xano

PreviousCreate a bookmark functionality with remote actions and device ID with XanoNextSetting up the Xano Log in Snippet

Last updated 3 years ago

Was this helpful?

In this guide, we'll show you how to import an existing Xano snippet and connect it to the Bravo frontend, to enable the use of the toggle in a multi-user app. The feature will be used to authenticate the users, and keep the user information in Xano.

As many users will be using the app, the backend must keep track of the state of each toggle, for each user. Here, Xano will be used as the backend tool, but the same approach would work for any other backend setup with logic and database capabilities.

In future updates of the guide, we'll show how to create the Xano database and API endpoints from scratch. For now, you can import the snippet and make edits to the setup after that.

Importing the Xano setup

In order to follow this guide, create a Xano account (in case you don't have one) and log in. Once you do that, open the Xano snippet below. This snippet will contain both a Products and Users table, plus all the needed API endpoints to interact with the database.

Once you open the snippet link, click on "Add to an existing Xano account". There, you'll be asked to log in with your Xano credentials. After logging in, choose your Xano instance, and finally click on "Add to Instance".

Then, open your Xano instance, and go to Marketplace > Purchased. There, you'll find the Xano snippet. Click on it, and you'll be able to install it.

Also, in the API section, you'll see an API group called Like Button. Here, you'll see all the API endpoints that will be targeted from Bravo to connect the mobile app to the Xano backend. These endpoints are ready with all the needed logic to authenticate users, change the component states, and get the product list together with their state. Feel free to dig a bit deeper into the logic to understand how they work.

Now that the Xano setup is ready, it's time to import the design file in Bravo Studio and create the API requests to target the backend.

Importing the design file

To set up the app project in Bravo, import the following design file:

Creating the API collection and requests

Now that the Bravo project is created, it's time to set up all the necessary API requests. Xano provides a way to export the API endpoints in Swagger format, which can be imported then as a new API collection in Bravo.

To do that, go to the Xano API group, and export the API specification as shown below.

After exporting the file, go to Bravo Data Collections, and create a new collection using the Swagger import. Choose all the API endpoints, as you'll need all of them later.

Now, you should have the following API requests created:

First, we need to duplicate the PATCH request targeting the endpoint to like/unlike a product. As liking and unliking are two different actions, the request bodies will be different. Duplicate the PATCH request, name one of them "Like a product", and the other one "Unlike a product". You don't need to touch the request URL.

For the Like a product request, use the following JSON body:

{
  "user_id": "${user.id}",
  "state": "active"
}

For the Unlike a product request, use the following JSON body:

{
  "user_id": "${user.id}",
  "state": "default"
}

Now, make sure to use ${user.id} in the requests that require filtering by user ID: the one to get all products, and the one to get the liked products.

Now, you can go ahead and test all the requests, including the ones for user authentication. If they work as expected, you can go to the next section and set up the user authentication.

In case you get API errors in some of the requests, create a new API request, copy the request URL from the request showing errors, and try again with the new request.

Setting up the user authentication flow

As mentioned earlier, we'll use the Custom Authentication feature to set up the user authentication flow with Xano. All the user data will be stored in the users table in Xano.

To set it up, follow the steps 2 and 3 of the Custom Authentication guide. You can skip the part of creating the API requests (they are already created for you), but make sure to test them as specified there.

Binding the API requests to the app screens

Once the API requests are working as expected, it's time to bind them to the different app screens. Follow the instructions below to do it.

Make sure you've selected all the necessary data items when testing the API requests.

Product list screen

Detail page screen

Liked products screen

Once installed, you'll see both the "All products" and "Like Users" tables in the Database section. The first table will contain all the products that will be listed in the app, including a reference to the "Like Users" table, to keep track of which items are in "active" state for each user. The "Like Users" table will store the user information, including authentication credentials. It will be used to authenticate the users with the app, using . You'll be able to edit the content of those tables as you wish.

Each of those requests target the API endpoints existing in Xano. We need to make some edits for it to work with the variable in Bravo, so the user IDs are exchanged properly with the backend.

Get All Products request URL: Get Liked Products request URL:

🗂️
Custom Authentication
User ID
https://xxxx.xano.io/yyyy/all_products?user_id=${user.id}
https://xxxx.xano.io/yyyy/liked_products?user_id=${user.id}
Custom Authentication
LogoMultiuser Like Button - Xano | No Code Development PlatformXano
LogoBravo Sample: Multi-User Like ButtonFigma
LogoCustom Authentication (Beta)Bravo Studio Help Center