Mobile App: Login successful but not retrieving identity

How can I explain this …

Mobile Site:

  • LogIn Form
  • User Details Recordset

API Site:

  • User Login Action
  • User Details Query

What should happen:

  • When logging in on the mobile site it should display user details.
  • Log In Form should have a status of 200.
  • User Details Server Connect should return results and have a 200 status.

What happens:

  • User login form does return a 200 status with valid credentials, 401 with non-valid credentials.
  • No user data is displayed as recordset is empty because the identity is not being passed on to the query. 401 status … because of the security restrict step.

Everything works as it should on the API site just not on the mobile site. So not sure how to explain it. the login is successful but it’s not holding the identity to filter the results with.

How do you have a recordset on the mobile site, as there you can’t run any serverside data?
This user details recordset should be a separate server action in the API project, filtered by the logged user identity. Is that what you mean and is that how you have it set up?

Are you 100% sure no identity is returned and how did you check this?
Have you added the identify step in Global Steps and have you enabled the output for it in order to be able to see what it returns when you run your server actions?

Yes, that is of course how it is set up.

The recordset is empty

Not sure what you mean here?

Thank you so much for your help. Again, this all works fine on the API site just not the mobile site.

I don’t understand what do you mean Brad. All the server side data runs on the server side i.e. on the API project.
Please post some screenshots of what is that “recordset”, how is it set up and what exactly are you doing with it.

Ok, I will take some screenshots and post exactly what is going on. Thank you.

Now, go get some sleep! I don’t expect 24 hour a day support! It can wait until morning. :wink: :beers:

That’s what i mean:

Canadians…

1 Like

1 Like

Here are some screenshots … hope they help. I also tried your globals method and that didn’t make any difference.

Sorry Brad didn’t mean to offend with Terrence and Philip!

eng

I see you have no Permissions set for the Users in the Users & Permissions area? Nothing will be returned as there are no results to match against, am pretty sure this will reflect on your current situation. Any reason why no Permissions are set there?

1 Like

lol, no offense taken.

Generally I never have anything in the permissions unless I have different levels of authority. However, I just tried with permissions and it made no difference. :frowning:

If you feel comfortable please send me login details? Will at least clear up if caching has anything to do with it. Happy I didn’t offend you, is a relief.

Cant send login details as the mobile project is just local. iOS App … and that’s where the problem is.

Same set up works great on API website though. I can send you those details.

Is it deployed and installed on an IOS device Brad? If it works site side should work no problem with your application mate. No need for me to log-in if the API side is all good (thanks for the confidence in sending the details though).

Hey Brad, what server model is this? I’ve had return identity issues in asp.net and they may still be there, as I haven’t had to work on that project lately. I’ve had to go into the server action and edit the file and add the returning field.

Brad, you should not be using security provider as a step in your server actions.
Security provider should be defined once under globals and then in your login step yyjuat add login step and select the security provider from the dropdown.
Same for the other server action, using the restrict step.

So fix these please.

Also what’s your workflow there? You log in and then what happens? What do you actually do with your other server action?

Alright, I cleaned that up. It does make more sense I like the identity under globals. Nice!

However it still doesn’t work …

When logged in it should reload the user details record as it does. You can see by the 200 status. And it should display a username which it doesn’t and it should also hide the login form if user details has records which it doesn’t.

The fact that no user name is displayed and form remains visible suggests to me that the identity is not being read.

How have you defined this on the page? I.e. how is this done on the page?
Also - what is shown in the dev tools after the log in? Do you see the identify step returning there?

Well, showing the username is a simple binding from the recordset.
Hiding the form is done with dynamic attribute display --> hide when user details recordset has records.

So how have you done this Brad?
How is this recordset loaded? When? How is the data added on the page?
Also - what is shown in the dev tools > network > xhr after the log in? Do you see the identify step returning there?