Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code suddenly stopped working #170

Open
RyanMccaffrey opened this issue Jul 2, 2019 · 1 comment
Open

Example code suddenly stopped working #170

RyanMccaffrey opened this issue Jul 2, 2019 · 1 comment

Comments

@RyanMccaffrey
Copy link

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

@tipa
Copy link

tipa commented May 8, 2020

Have you ever found a solution to this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants