2

Hi I'm using Google Chrome Custom Tabs for a project and I have a few issues with deep linking.

I need to authenticate the users through a oauth2 process using chrome custom tabs. The user is sent to the authentication form then types is login/password. Then it is redirected to a url like myapp://something. An intent is then triggered and the user is sent back to the app.

The process is working well at first launch when the user is logging in through the authentication form. However, if I try to get another authentication code, I get an ERR_UNKNOWN_URL_SCHEME error and the app stays on the custom tabs.

Here are the three cases I tested :

1st case : Chrome custom tab, forcing the user to use the authentication form

-The user is sent to the authentication form

-A 302 redirect is done to a custom url

-The user is switched to the app

2nd case : Chrome custom tab (using the session cookie)

-The user is sent to the authentication website

-A 302 redirect is done to a custom url

-An ERR_UNKNOWN_URL_SCHEME occurs

3rd case : Chrome browser (using the authentication form or the session cookie)

-The user is sent to the authentication website

-A 302 redirect is done to a custom url

-The user is switched to the app

The full process is working with the chrome browser but I have to make it work with Custom Tabs. Is this behaviour normal ? I mean i read that a user interaction might be needed to use deep links but everything is working well with the chrome brower. Without this deep linking process, how is it possible to do SSO with custom tabs ?

PS : Here's a video to explain my issue and the tests done https://www.youtube.com/watch?v=Y-4uLpUv1lA

4
  • 1
    It seems to be a bug in ChromeCustomTabs. I opened a ticket on googlecode here code.google.com/p/chromium/issues/detail?id=580069
    – Jejefcgb
    Jan 22, 2016 at 9:06
  • I think it happens is due to the second redirect not being a result of a user action. Eg: on the first one, the user clicks the login button, and then the user is redirected. On the second one, the server issues an automatic redirect, as the user is already logged in and chrome doesn't follow it.
    – andreban
    Feb 12, 2016 at 10:39
  • I agree with you. But that's kind of annoying as Oauth code flow cannot be used properly with custom tabs. I just read the following post that seems interesting paul.kinlan.me/deep-app-linking-on-android-and-chrome/…. "the redirect only works if the user clicks on the same domain that will then try to start the intent." I'll try to change my redirect url to see if this solution is working.
    – Jejefcgb
    Feb 12, 2016 at 10:53
  • 1
    The Chrome developer team seems to have fixed this bug with the latest chrome release (48+). See code.google.com/p/chromium/issues/detail?id=580069.
    – Jejefcgb
    Feb 18, 2016 at 15:03

1 Answer 1

1

Bug fixed with the latest chrome release : https://bugs.chromium.org/p/chromium/issues/detail?id=580069

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.