Android Access Token Not Working

We have two login mechanisms. One is Lock for web, which works fine. The other is Lock for android. With this latter login system, the access token we are provided with does not seem to validate, in that our API throws a 401 error.

The code that DOES work in web:

this.lock = new Auth0Lock(
this.lock.on("authenticated", $.proxy(this.onLockAuthenticated, this));
   localStorage.setItem('accessToken', authResult.accessToken);

The code that DOES NOT work in Android:

        Auth0 auth0 = new Auth0(getString(R.string.com_auth0_client_id), getString(R.string.com_auth0_domain));
        lock = Lock.newBuilder(auth0, callback)

Does anyone have any ideas?

FYI incase anyone has this issue in future, I had to remove the audience paramater. I’m not sure why that fixed it, but it did!

as in:

lock = Lock.newBuilder(auth0, callback)

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