Opaque token returned for hosted lock with audience param

You shouldn’t be setting the audience in the hosted login page, it should be set in your auth0.WebAuth object that makes the original authorization request.

Your hosted login page code should look like:

var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
   auth: {
     redirectUrl: config.callbackURL,
     responseType: (config.internalOptions || {}).response_type ||
       config.callbackOnLocationHash ? 'token' : 'code',
     params: config.internalOptions
   },

And your WebAuth request should be:

var webAuth = new auth0.WebAuth({
  domain: {YOUR_AUTH0_DOMAIN}, 
  clientID: {CLIENT_ID},
  audience: {API_AUDIENCE},
  redirectUri: {CALLBACK_URL}, 
  scope: 'openid profile',
  responseType: 'token id_token'
});
webAuth.authorize();

This will give you a JWT access token. Also note that [when the audience is /userinfo] (https://auth0.com/docs/tokens/access-token#access-token-format), an opaque token will always be issued.