proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.29k stars 220 forks source link

How do I clear the browsers cache/state #393

Closed MoSattler closed 1 year ago

MoSattler commented 1 year ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

In our app, user's can log out. When they logout, we also want to log them out from the in-app browser. Right now, after they log out from the app, and they open the browser, they are still logged in the browser.

Is there any function we can call to clear the browser cache, so we can clear everything upon logout?

asdolo commented 1 year ago

You can set ephemeralWebSession: true in the options params of openAuth, but it only works for iOS.

fltonii commented 1 year ago

Hmm, any way to do this in Android? I'm thinking of launching the browser on logout and calling an endpoint that clears the cookies, but that's pretty lame tbh. I'd much prefer to have a way to stash the cookies as the IAB closes.

asdolo commented 1 year ago

@MoSattler did you find a solution?

MoSattler commented 1 year ago

No, but I am not looking anymore