Consent required error when trying to call a simple API from angular app

I’ve created a very simple Angular app and an API (asp.net core web api) using quickStart guides provided

https://auth0.com/docs/quickstart/spa/angular/01-login

https://auth0.com/docs/quickstart/backend/aspnet-core-webapi/01-authorization

When I try to call the protected API from angular app I keep getting “Consent Required” error .

This happens localhost and production as well, I understand silent auth doesn’t work localhost but I’m not interested in silent auth, I can live with a letting users to give consent when calling the backend API but consent dialog never pops up.

Seems like I’m missing something obvious here? But I’ve went through many guides still can’t find an answer.

Hi @jb23
Is your API hosted on localhost? Don’t do that, it will require consent.

Host it on a FQDN.

John

1 Like

Do you mean the application or the API? I’m doing local development so do you mena by using host file?

Is this information anywhere in the documentations?

Hi @jb23

I mean the app.
See the docs here:

For dev, I usually just accept the consent, rather than mess with DNS or host files

John

I’m having the same issue. I’m also ok with users giving consent in dev but the dialog never appears. Any solution to this problem?

1 Like