I am using an external url to handle the authentication for my react-native app. I send the user to a webview with a loginurl. Following is a snippet from my Signin.tsx code: -
<WebView
cacheEnabled={false}
source={{uri: this.state.loginUri}}
onNavigationStateChange={this.onNavigationStateChange}
incognito={true}
/>
The 'incognito' property works perfectly on iOS but doesnt seem to work at all for Android. My goal is for the Webview to not save any data during its lifetime. There are multiple pages in the login and after entering one detail, it automatically takes the previously logged in account's details and autologs in with the older credentials.
I have tried updating react-native-webview to the latest(v11.3.1) and have also tried CookieManager.clearAll(){used from react-native-community/cookies}. Nothing seems to work. Can someone help me in understanding why its working for iOS and not Android?