Backendless Registration/Login Setup

For those that want to use backendless, I made a short guide.

https://symmetricdynamite.gitbook.io/backendless-appgyver/

7 Likes

Hi Symmetric_Dynamite,

I have utilized your short guide and received this with my test:

Test API call response Status error
Error: TypeError: Failed to fetch. Does the server allow CORS?status: undefined

                            Resource settings for Create record (POST)
                            ………………………………….

Resource URL: https://api.backendless.com/4D3346C7-9B88-55C0-FF/0677B8FA-AF67-464E-AF/Users/register Relative path: undefined

Can you tell what went wrong?

Gerhard

The API key format is as follows:

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

don’t forget to create the custom schema: login/password
You also need to define Content-Type: application/json in the header.

backendless now has a guide on their website here:

How to Integrate AppGyver With Backendless | Backendless

which might be more useful.

1 Like

Hey Dynamite,

Thanks for creating your concise doc. :smiley:

You’ve shown getting a record in your documentation.

What if I want to update record based on the user who has just registered? I want to add username, birthdates, and what not to this user.

Is there a way to pass the objectId or any form of Id of the registered user through the system so that subsequent records updated can be funneled to the same row in the backend?

Backendless has this documentation that allows me to do that: Updating Single Object - Backendless REST API Documentation

However, through this method, I have to insert the exact objectId of the object. Which practically, isn’t feasible. Pretty sure there’s a formula to make the objectId dynamic so that updated records are only attributed to the registered user. I’ve been trying to figure this out for a day, to no avail.

Any guidance is much appreciated.

1 Like

Hi, did you happen to figure this out? I keep getting an error for a “not existing user token” and it asks me to log in again. I tried setting authUser.id to ownerId instead but that doesn’t work either.

Also, I was not able to use a “Page created” event on the login page as outlined in the guide. When I do so, hide spinner never works. I have to change it to “Page mounted”…could this be causing problems?

Hey @Steve_Thomas, this guide is a bit outdated. For example, the Page created event is deprecated, you need to use the Page mounted event instead. Also, I would suggest to set up a Client-side storage inside your Data configuration instead of using the marketplace functions.

1 Like

Thank you! I realized that my backendless settings were not allowing multiple logins per user. Once I fixed that, I was able to get it to work with a few tweaks to the guide (mainly, setting authUser.id and authUser.token independently via outputs[“Get item from storage”].item.id and outputs[“Get item from storage”].item.token). Eventually I will set up client-side storage for persistedUser, but it’s working for now.

2 Likes

Hi @Symmetric_Dynamite,

Could use some help, I feel like I might be missing something, I feeling defeated. I am following your gitbook, very helpful, and I’ve hit a road block. On the Login setup, when going and testing for obtaining the schema, I keep getting the 401 error. I’ve gone back through the Login setup documentation, and screen shots and I’m stumped. I am using a valid and enabled user(email) and password

Here is my Create config tab settings

Here is my schema tab settings

and the test result

Hi, @Symmetric_Dynamite - I am getting the exact same error as Walter, above.

Hi all.

Does anyone else have new problems with Backendless user login through an appgyver created app (using SAP AppGyver preview app)? Recently (last week or 2) I am getting a “login failed” message when trying to login to any app I have created with AppGyver (via SAP AppGyver preview app) that uses the Backendless login restAPI. Web- based login via preview is still working fine. I haven’t changed anything- - maybe there was a recent AppGyver update that changed things?

Thanks.