Security provider return FALSE on App androis/ios

I am having problems with the security provider function for my application in capacitor. If I try to launch it on the web it works and returns the user id, instead on android and iOS it always returns false. I have read all the posts about it but I can’t come up with it. Can someone explain to me where I am going wrong? I use nodejs.

Have you ticked the credentials option on the Server Connect component?

Yes, it has been activated. In fact on the web it works for me. It’s just an app problem. I have also activated this configuration on the capacitor configuration file.Screenshot 2023-06-08 alle 08.26.19

can this help?

Sorry for the constant posts, but I have to decide on the way forward to complete a job. Reading a post by @sylvainbaron e gave up by configuring the local session with the ID (identity) on the index.html file. @Teodor, @George is this the only way? For example in the Android simulator it works, then on mobile it doesn’t. Please help me because I’m going crazy. Thank you.

Hi, i finally used local_storage to save the user_id and run my differents SC.
I never succeeded using cookies with iOS.

Thank you for your answer. To protect api calls what solution did you find?

Did you try this?

My app projects are still using Cordova, so I don’t have much to offer, but my capacitor test to consistently maintain login, worked fine by following the advice of @bpj

Thank you, I have finally solved it. The problem was CORS configured well on the local and when I transferred to the remote server it was not updated (I need to figure out why). However once I manually configured it all worked fine. Thank you we are a great community.

All of the server settings are per target. So you select the active target, then open up server settings and adjust for that target only.

1 Like