How does AuthSession handle "Navigation is blocked" on Android?


#1

So I recently stumbled upon AuthSession. Until now, I’ve been using the approach explained in the Linking docs.

This works fine, but I’ve run into the problem that sometimes Chrome will block the redirect back to the app with an error like the following (in my case coming from instagram OAuth)

I chromium: [INFO:CONSOLE(0)] "Navigation is blocked: exp://192.168.0.70:19000/+/auth/instagram/code=d774748515f34e268b3f44b549149f9e", source: (0)

I created an issue about this on the Expo repo here, but finally came to the conclusion that it wasn’t an Expo issue, but that the problem is that Chrome blocks direct redirects to other apps on Android, unless they’ve been explicitly invoked by the user (i.e. button click).

See discussion here and here for more info. In essence, this is to prevent ads or similar from navigating the user to an app without his/her consent.

The solution seems to be, in the case of Android, to show a splash page on the proxy/redirect endpoint that allows the user to press “Go back to app”. However, this isn\t mentioned in the AuthSession docs, so how is this handled?

Thanks :slight_smile:


closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.