Hi,
Wappler node.js backend and creating a mobile app (separate project).
I have the login working as it returns Identity correctly -
(thats is the user id and it changes with whichever user I log in as so assume it is working)
And then redirects to another page, so all good there (thanks @brad).
Now when I try to load some information on the new page (server connect to an API that works on the backend) I am not getting any results.
Turned on debug and I am seeing the following:
I have tried the API with and without a security provider, by using the user ID as a parameter, anything else I can look at?
It works fine in the backend loading all the data and querying it by user permission etc but not through the mobile app.
Any pointers on what I should be looking at?
Thanks, Paul
Very straightforward, query the user table based on the logged-in user (security identify).
I have turned off debug now as the information didn’t help.
I assume the login is successful as I get {“identity”:1} as the response (and the number changes depending on the user I logged in as) and the page changes (also if I give an incorrect username etc, I get the alert I have setup).
What is odd is that it works with the test pages on the backend project, but not on the login of the app project.
Ok, used my staging server, changed it to production (so live remote server, usage set as production).
Changed the login and first server connect to the staging server.
Tested and got:
userdetails is the name of the query in my server connect step.
The user ID is correctly being added to a session variable and the login stage is also returning the “identity” correctly.
Did you add your server connect to your mobile project before or after you changed target of your API. You need to add it after as the path won’t be correct.