Appgyver/Backendless Login

This page discusses setup of the data configurator, UI, and flow logic.

AppGyver Data Configurator

We can now go to data configurator, add another API direct integration, and paste our previously copied backendless request URL (API) into the resource URL field. We need to add /login after users. You can choose any name as your resource ID.

https://api.backendless.com/application-id/REST-api-key/users/login

The redaction is only meant to keep others from using my API key. Please do not delete that data from your resource URL.

We will now select create post, and enable method.

In the HTTP header, we need to add Content-Type with the value application/json. Content-Type: application/json

Go to Schema, custom properties, and create login and password properties.

Go to Test tab, select custom object, and input login and password data from an already registered user. Click run test.

After you run the test, set the response schema and save the owner ID and user-token for later use.

AppGyver Login UI

We are now ready to create our login page. For our purposes I created two user inputs, email and password, and a login button.

This process is similar to the registration UI, in that you will need to set two page variables, and bind those page variables to the input fields.

App Variables

Let's now create two app variables: authUser, and currentUser. The app variables should be type object. authUser will have two properties: id, and token; And the currentUser will have three properties: email, id, and name.

Page logic

We can now go back to view, click anywhere on the page, and open the logic editor. We should change page mounted to page created.

Go to flowfunction market, and search for and download "Get Item from Storage" and "set item to storage".

In the logic editor, we connect Get Item from Storage, and set item key to persistedUser.

Next, we want to add the if condition utility and bind that to a formula

!IS_NULL(outputs["Get item from storage"].item)

We can now set the app variables

And bind those variables.

Button Login Logic

We can start by creating the record

And binding that to the page variables

We can now set our app variable

Select output value of another node

Select create record, and bind them to the correct data property. In this case it's object-id and user-token.

Now we can set the item to storage. Item key should be persistedUser, and we are storing the authUser.

We are almost done. We can now create our user dashboard and configure our user data resource.

Last updated