Cap-go / capacitor-inappbrowser

Capacitor plugin in app browser with urlChangeEvent
MIT License
58 stars 37 forks source link

Add cookies management support #95

Closed monokaijs closed 6 months ago

monokaijs commented 7 months ago

I've recently working on a project which I have to manually handle the cookie (credentials) in the client-side. I've modified the plugin so it can read In-app Browser cookies by url. A httpOnly filter also has been implemented.

Example: InAppBrowser.

import { InAppBrowser } from '@capgo/inappbrowser';

const webUrl = "https://m.facebook.com";

InAppBrowser.open(webUrl);

// Read the cookies after 10 seconds
setTimeout(() => {
  InAppBrowser.getCookies({
    url: webUrl
  }).then(console.log);
}, 10 * 1000);

Hope this helps.

Cheers,

monokaijs commented 7 months ago

@riderx, please check this out, I need these changes available on production.

Thank you.

riderx commented 6 months ago

@monokaijs sorry i didn't saw your message in all notifs :/

riderx commented 6 months ago

I can merge it now, if you tell me it's still good

riderx commented 6 months ago

Just need to run lint in local, and fix

monokaijs commented 6 months ago

I have the modified version of this plugin in my production project and it's working properly.

riderx commented 6 months ago

Ok thanks I will fix the lint and merge it then

riderx commented 6 months ago

ios was not building at all, so i had to fix it, last check and it should be good

riderx commented 6 months ago

ios was not building at all, so i had to fix it, thanks for the work !