[InAppBrowser Plugin] How to open a URL with cookies?

[InAppBrowser Plugin] How to open a URL with cookies?

  
Forge Component
(5)
Published on 2017-04-27 by OutSystems R&D
5 votes
Published on 2017-04-27 by OutSystems R&D

Hi All,

I'm trying to open a URL inside mobile app, it works fine but can I pass a cookie/session along with URL?

Reason to do: User is already login into app and if user try to open a URL inside app (InAppBrowser) then user is redirected to login page. I want to pass a session here to avoid this issue.
Please Suggest. 

Thanks in advance.

Hi John,

In Service Studio, in the properties of the Module you can set the property Use Cookies to No. In that case the Session Identifier will go in the URL. 

Does that work for you?

Remember that having access like that to the SessionId can have security issues.

Cheers,

José

Hi José,

Thanks for replying. Solution you have provided is for Web Application. Is there similar features for mobile as well?

Please Suggest. 


Hi John,

My mistake. So, to clear things out:

You have a mobile application (in OutSystems) that uses the InAppBrowser plugin to open a URL from a web application (that is not an OutSystems app). Is that it? Or something else?

Cheers,

José

Hi José,

I have a mobile application (in OutSystems) which is using  InAppBrowser plugin. In mobile Left Menu Drawer, I have a link (Dashboard). This link can be opened by login user only.

Basically, I've a mobile version of a website. User is already Login into App but when I try to open Dashboard Link, I get a website Login page instead of Dashboard.

My main motive here is to pass a sessionID (Available in local storage) as a cookie in URL (InAppBrowser).





Hi John,

But, where/when did the user logged into the website? Because the session from your app is different from the session of the website.

Cheers,

José

Hi John,

Another thing, have you tried to set the values of Clearcache and Clearsessioncache (in the Options input parameter of the Open) to false?

Cheers,

José

Hi, how did you solve the problem?