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.

This property is only accessible if you have enabled authentication of any type.

Examples

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:

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:

  1. Select the Widget (e.g. Button) on which you want to define the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window.

    1. Click on the + Add Conditional Action.

    2. On the right side (Set Condition for Action), set the Source to Global Properties.

    3. Set the Available Options to Is User Logged In?.

    4. 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.

    5. 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.

    6. Click Close.

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:

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:

  1. Select the widget from the widget tree or canvas area.

  2. Move to the properties panel, turn on the Conditional Visibility, and click on the Unset. This will open a new panel.

  3. Set the Source to Global Properties.

  4. Set the Available Options to Is User Logged In?.

  5. Click Confirm.

Last updated