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

Android openAuth method cancels browser on deep link redirection #239 #396

Open nateshmbhat opened 1 year ago

nateshmbhat commented 1 year ago

Facing same issue as #239 . Reopening it.

martintanbit commented 1 year ago

For some reason this simply fixes it for me:

// This fixed it for me
await new Promise(r => setTimeout(r, 1000));

const res = await InAppBrowser.openAuth(url, '', {
  ephemeralWebSession: false,
  showTitle: false,
  enableUrlBarHiding: true,
  enableDefaultShare: false,
});
nateshmbhat commented 1 year ago

For some reason this simply fixes it for me:

// This fixed it for me
await new Promise(r => setTimeout(r, 1000));

const res = await InAppBrowser.openAuth(url, '', {
  ephemeralWebSession: false,
  showTitle: false,
  enableUrlBarHiding: true,
  enableDefaultShare: false,
});

Tried, didn't work

I'm using the following config :

 {
        // iOS Properties
        ephemeralWebSession: false,
        // Android Properties
        showTitle: false,
        enableUrlBarHiding: true,
        enableDefaultShare: false,
        animated: true,
        showInRecents: true,
        /**
         * Keeping this as "true" is important.
         * This is a fix for : SGAPP-5404
         */
        forceCloseOnRedirection: true,
        hasBackButton: true,
martintanbit commented 1 year ago

just to clarify, it fixed the issue for me in iOS - I didn't encounter this issue on Android (the issue happens on iOS only, for some reason)

harveyconnor commented 1 year ago

@nateshmbhat did you have any luck with this? We are now experiencing this too... If you figured it out could you please post the solution?

krini commented 6 months ago

Did anyone solve this?