proyecto26 / react-native-inappbrowser

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

Case Sensitive URL Check Prevents Successful Redirect with `openAuth` on Android #429

Open Ariflo opened 11 months ago

Ariflo commented 11 months ago

Issue

The check for event.url.startsWith(returnUrl) here prevented my OAuth session from successfully completing the redirect on Android. As far as I can tell this was due to the fact that we were passing in the app scheme URL in camel case as a redirect. In other words; "AwseomApp://" !== "awesomeapp://".

Suggested fix

Use .toLowerCase() to do a valid equivalent check here.