Links

Is User Logged In

This property is used to know if the user is logged in to the app. You can access this when the Source is set to Global Properties.
While building the app, you might need to know if the user is logged in to provide certain functionality to only registered users or show/hide a few UI elements based on user is logged in or not. This property helps you build such a requirement.

Prerequisites

This property only works if you have enabled and configured the Firebase Authentication. Check out this page for setting up authentication.

How to use

There can be many use cases for using this property but for the demonstration purpose, we will build a couple of use cases to show you how to use Is User Logged In.

Open login page before purchase

If you are building an app that sells or books something, You may allow users to browse through the items at first and open the login page when trying to purchase the item. Let's see how to use Is User Logged In property to build something like this:
Opening login page before purchase

Using a global property with Conditional Action

On Tap of a button (button such as buy, book, shop), you can add the conditional action with Is User Logged In property as a condition. Based on whether the user logged in, you can add two different actions.
Here are the step-by-step instructions:
  • Select the Widget (e.g. Button) on which you want to define the action.
  • Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window.
    • Click on the + Add Conditional Action.
    • On the right side (Set Condition for Action), set the Source to Global Properties.
    • Set the Available Options to Is User Logged In?.
    • On the left, below the TRUE label, click on the + button and Add Action that will be executed if the user is logged in. This can be the navigate to the payment page action.
    • Now, on the right, below the FALSE label, click on the + button and Add Action that will be executed if the user is not logged in. This can be the navigate to the login page action.
    • Click Close.
Using a global property with Conditional Action

Show bookmark button only if user logged in

You might want to allow users to bookmark/save items only if logged in. Let's see how to use Is User Logged In property to build something like this:
Showing bookmark button only if user logged in

Using a global property with Conditional Visibility

You can use the Is User Logged In property while adding the conditional visibility on a widget. This will show the widget if the user is logged in.
Here are the step-by-step instructions:
  • Select the widget from the widget tree or canvas area.
  • Move to the properties panel, turn on the Conditional Visibility, and click on the Unset. This will open a new panel.
  • Set the Source to Global Properties.
  • Set the Available Options to Is User Logged In?.
  • Click Confirm.
Using a global property with Conditional Visibility