Example code suddenly stopped working
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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