Appgyver/Backendless Login
This page discusses setup of the data configurator, UI, and flow logic.
Last updated
Was this helpful?
This page discusses setup of the data configurator, UI, and flow logic.
Last updated
Was this helpful?
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.
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.
We are now ready to create our login page. For our purposes I created two user inputs, email and password, and a login button.
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.
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
We can now set the app variables
And bind those variables.
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.