Migration of existing Website

Hi, i have an existing Website and want to migrate some subsites to an mobile app with ionic+capacitor. The authorization is done via Cookies, but i want to look into openidconnect for authorization in the future.

As i know, i can open an inApp-Browser via the capacitor plugin to show sites, that are not already convertet. What should i do, to pass Cookies into this browser to show site, that are not already migrated? I read, that its not supported to inject cookies in the inApp-browser. how can i authenticate the user when i cant use cookies? Should i pass the cookie/openid token via a url parameter?

You can maybe still use the cordova-plugin-inappbrowser to pass data using the InAppBrowser.executeScript method.

Example:

this.inAppBrowserInstance = this.inAppBrowser.create(URL, '_blank');    
this.inAppBrowserInstance.on('beforeload')subscribe(event => {
     this.inAppBrowserInstance.executeScript({ code: `document.cookie = "JSESSIONID=cookievalue"`
 }
1 Like