I was trying to bypass the user consent screen for my user into my app. Most of the threads on this it pretty much right except for one part that maybe is different from when they were written (all in the mid - early 2017).
Here’s one of them:
http://community.auth0.com/t/how-do-i-skip-the-consent-page-for-my-api-authorization-flow/6035
One of the answers out there said that when you create the auth0 client:
auth0 = new auth0.WebAuth({
clientID: '{client_id}',
domain: '{domain}.auth0.com',
responseType: 'token id_token',
audience: 'https://{domain}.auth0.com/userinfo',
redirectUri: '{redirect_url}',
scope: 'openid'
});
If the audience you use is {domain}.auth0.com/userinfo, all you have to do is set the skip content switch on the api that was created when you set up your account. I found that I had to change the audience field to: {domain}.auth0.com/api/v2 (or whatever the link for your api is) . So my client instantiation looked like this:
auth0 = new auth0.WebAuth({
clientID: '{client_id}',
domain: '{domain}.auth0.com',
responseType: 'token id_token',
audience: 'https://{domain}.auth0.com/api/v2',
redirectUri: '{redirect_url}',
scope: 'openid'
});
then it started working…