Mobile App: Login successful but not retrieving identity

Brad, i don’t really understand what your issue in this topic is.
From what i understand you have a mobile project, which runs a server action from another (API) project that logs the users in. So what is not working exactly?
Isn’t the user logged in when you enter the username and password in the login server connect form of your mobile project and submit it?

Also, you can use the login step as a value for a setvalue step in your login action to output the logged user identity.

Brad 401 means validation error, so you probably have validation rules in the server connect action input…

Yes, I know. It’s not being validated because the identity is not being passed to the site from the API site. If I take off the security enforcer I get a 200 status but of course no results as the identity is not being passed.

The login is successful but the identity is not being passed on therefore the user details server action does not validate and returns no records.

Yep, but no value gets passed on to mobile site.

What do you mean no value gets passed to the mobile site? What are you trying to pass? How and where? What are you trying to achieve?

Are you sure you understand how login works? The login is done on the server side, not on your site, so the identity value is returned by your server action, not on the site / front end …

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.