Ask for access directly on loginWithPopup

Dear auth0 community

My stack: reactTs frontend, nodeTs express backend api

I am trying to implement the following:
I want users to register with loginWithPopup() and then ask for an api access token with getAccessTokenSilently({audience:“myaudience”}). The Problem is that this combination of hooks gives me the error: “Error: Consent required”. This could theoretically be fixed by changing either hook loginWithPopup or getAccessTokenSilently to their less convenient versions loginWithRedirect or getAccessTokenWithPopup. Neither is an option for my usecase . Why isn’t it just possbile to directly ask my user to actively grant acces to the application when they log in via the Pop up ? Why do i need a separate popup for this? why should my application open a 0.1 sec popup everytime it requests a new access token? How can I solve this with the current hooks?

any help is appreciated

Hi @blendaddict,

Welcome to the Auth0 Community!

Do you want the consent dialogue shown at all? If it is a first party application you can skip it entirely.

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