1

I want to use the implicit grant authentication in my android app. Currently I am having trouble in understanding what redirectUri I should supply. Should it be a deeplink to my app? Would appreciate any help

Mikhail Kim
  • 559
  • 7
  • 18

1 Answers1

2

The redirectUri can be found on your UBER developer dashboard. Please see here fore more details.

To redirect the user back to your own app, define your own URI scheme in your app's AndroidManifest.xml, inside the Activity that handles the response from UBER:

<intent-filter>
    <data android:scheme="your.special.scheme" />
    <action android:name="android.intent.action.VIEW" />
</intent-filter>

Then, in UBER's developer dashboard, you can set the following Redirect URL:

 your.special.scheme://callback

Once a user has authorized your app via the browser, UBER will send an authorization code back to your app using the above URI scheme. The authorization code will be supplied to your app via a "code" parameter, which you'll then use to create a credential-object:

Credential credential = credentials.authenticate(authorizationCode, userId);

See here and here for details. Here is an answer dealing with this issue for iOS.

Community
  • 1
  • 1
Miraduro
  • 229
  • 1
  • 9
  • I know that it is in there. But i just put http//:localhost there for cimplicity, which is obviously not correct. So the question is what should be the link. – Mikhail Kim Apr 16 '17 at 13:21