uber / uber/rides-android-sdk

Example code suddenly stopped working

Open
#170 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
293
Forks
132
PR merge metrics
No merged PRs in 30d

Description

Library version: all

Repro steps, stacktrace, screenshots:

Code was working for a solid year unchanged, just like the example:

config = new SessionConfiguration.Builder()
                .setClientId(getString(R.string.uberClientId)) //This is necessary
                .setRedirectUri(getString(R.string.uberRedirectURI)) //This is necessary if you'll be using implicit grant
                .setServerToken(getString(R.string.uberServerToken))
                .setClientSecret(((MyApplication)getApplication()).getUberSecret())
                .setEnvironment(SessionConfiguration.Environment.PRODUCTION) //Useful for testing your app in the sandbox environment
                .setScopes(Arrays.asList(Scope.PROFILE)) //Your scopes for authentication here
                .build();
loginManager = new LoginManager(accessTokenStorage, new LoginCallback() {
                    @Override
                    public void onLoginCancel() {
                   
                    }

                    @Override
                    public void onLoginError(@NonNull AuthenticationError error) {
                        System.out.println(error.toStandardString());
                    }

                    @Override
                    public void onLoginSuccess(@NonNull AccessToken accessToken) {
                        ((MyApplication)getApplication()).setUberAccessToken(accessToken.getToken(), accessToken.getRefreshToken());
                    }

                    @Override
                    public void onAuthorizationCodeReceived(@NonNull String authorizationCode) {
                   
                  }
                }, config, UBER_RESPONSE_CODE);
                loginManager.login(context);


            }
        });

Now any and all scopes, including general scopes setup in the developers center throw an INVALID_SCOPE. I suspect something changed in the uber app that is causing an incompatibility with the SDK. Nothing at all has changed on my side.

Expected Behavior: User Authentication

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Java example in the issue and reproduce the INVALID_SCOPE response using the shown SessionConfiguration and LoginManager flow. No repository file or test is identified in the report; trace the SDK's authentication and scope entry points, with completion indicated by configured scopes being accepted without INVALID_SCOPE.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.