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://".
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.