Getting an authorization code using Android SDK


I’m trying to implement the authorization code flow where an Android app requests an authorization code and and gives it to the Auth0 app on another device (a BLE peripheral in this case).

That device, in turn, will use the code to obtain a token.
I specified .withResponseType(ResponseType.CODE) when calling login, but it looks like the API will do anything it can to give me Credentials instead.

Is there an API in the Auth0 Android SDK which will give me an authorization code?

Thanks, Gilad.

This is an inelegant solution, but I overrode the intent-filter set up by the filter, caught the intent, and parsed it manually.

I hope that this functionality will be available in the SDK some day.

<activity android:name=".RedirectActivity">
                <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

                android:scheme="my_scheme" />

The code for RedirectActivity was copied from the SDK:

public class RedirectActivity extends Activity {
    public void onCreate(Bundle savedInstanceBundle) {
        Intent intent = new Intent(this, MyActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
        if (getIntent() != null) {