Howto set scope on a AuthenticationAPIClient connection from Android app (java)

Hello!

AndroidStudio, java, native app.

I create a id_token using this call:

AuthenticationAPIClient authentication = new AuthenticationAPIClient(auth0);

authentication
.login(userName, password, “Username-Password-Authentication”)
.setScope(“openid offline_access”)
.setDevice(“xxx”)
.start(new BaseCallback<Credentials, AuthenticationException>() {
@Override
public void onSuccess(Credentials payload) {
}

It works except that setScope not seems to work, in my response I can see:

“scope”:“openid profile email address phone offline_access”

Im trying to replcate a call we do from a ios-app and the id_token created from the call above is much longer than the one from ios and I belive that this is related to the scope-parameter.

Any help on how to change the scope would be appriciated.

Thanks a lot!

Realised I have to set

auth0.setOIDCConformant(false);

on the Auth0 object. Works as expected now.

1 Like

Perfect! Glad to hear that and thanks for sharing!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.