Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Custom Tabs Oauth2 Flow

I'm using chrome custom tabs to login with strava. I'm able to authorise the app, but the chrome custom tabs is not redirecting back to my app on reaching redirection.

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
       android:host="sample.example.com"
       android:pathPrefix="/"
       android:scheme="http" />
</intent-filter>

How can I redirect back to app when chrome custom tabs goes to redirect the URI?

like image 404
Victor Avatar asked Oct 19 '22 16:10

Victor


1 Answers

According to this: https://code.google.com/p/chromium/issues/detail?id=536037 the URI must have a custom scheme or the intent to the app will not be launched.

Try a URI like strava://callback or sample://example.

Also, make sure the URI defined in the intent matches the redirect_uri parameter used as well as the one registered to your app.

like image 120
Hennessy Avatar answered Oct 21 '22 07:10

Hennessy