RunSignUp-Team / RunSignup-Mobile-Timing-App

Apache License 2.0
3 stars 0 forks source link

Fix chromeOS deep-link action string #72

Closed mchisolm closed 1 year ago

mchisolm commented 1 year ago

Closes #41

I really went down the rabbit-hole on this one, but it ended up being a really simple fix once I narrowed down the issue. Turns out chromeOS handles deep links incorrectly (in my opinion). When we're done with the authorization flow, we have a redirect URL that the web browser redirects to, in our case com.rsu.mobile-timing-app://?code= followed by the oauth code. In chromeOS (and android), it knows that the com.rsu.mobile-timing-app scheme is associated with our app, so it creates a new intent with the action android.intent.action.VIEW and the url in the intent's data. However, on chromeOS, the action is org.chromium.arc.intent.action.VIEW, which RN is not expecting to see to pass along to the javascript side.

Anyway, I need you guys to test to make sure it totally works. As part of trying to figure all of this out, my local copy is now on hermes, I upgraded a ton of packages and had to re-export the expo prebuild stuff, root the android subsystem on my pixelbook, and a ton of other stuff. It shouldn't affect this change though.