AppgyverBackendless User Data Resource

In this page we will setup the dashboard, and configure the user data resource in appgyver configurator.

User Data Resource

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 can choose any name as resource ID.

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

Select Get Record, and add user-token as the HTTP Header

user-token

Select the Test tab and input the id and user-token.

If you saved the user-token and object-id from the previous login, you can simply use those. If not, you will have to generate them again.

After inputting the user-token and object-id you should receive a confirmation. Make sure to set the response Schema.

UI Dashboard

I've created a simple dashboard for our purposes.

We can bind the paragraph to the app variable currentUser, and its property email.

Page Logic

We now want to get our record from the authUser app variable.

We can set our app variable as such.

And bind the properties to the output value of the Get Record node.

Logout Button Logic

To logout, we simply delete the persistedUser from storage. First, we need to download delete item from storage from the flow function market.

Then we delete persisted user

We then want to download return to initial view from the flow function market. This will return the user to the login page after they logout.

Authentication

We are almost finished. To complete the setup, we need to activate authentication in appgyver. In our case we can select direct third party authentication.

We can then choose the login page to be our initial view. This is the page the user sees when they open the application.

If you go to the pages view, you should see something similar. You can delete the appgyver login page, and use your custom login page.

We now need to scroll to the navigation section and make sure the dashboard page (page after login) is properly set.

That is all :) Users can now register, login, and logout of your application using backendless rest API.

Last updated