# Ask for access directly on loginWithPopup

**URL:** <https://community.auth0.com/t/ask-for-access-directly-on-loginwithpopup/93601>\
**Category:** Get Help\
**Tags:** loginwithpopup, react\
**Created:** [November 2, 2022, 10:56pm UTC](https://community.auth0.com/t/ask-for-access-directly-on-loginwithpopup/93601 "2022-11-02T22:56:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blendaddict](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/blendaddict/32/40992_2.png) [@blendaddict](https://community.auth0.com/u/blendaddict)\
**Post date:** [November 2, 2022, 10:56pm UTC](https://community.auth0.com/t/ask-for-access-directly-on-loginwithpopup/93601/1 "2022-11-02T22:56:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 7, 2022, 8:21pm UTC](https://community.auth0.com/t/ask-for-access-directly-on-loginwithpopup/93601/3 "2022-11-07T20:21:49Z")

</div>

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.

> **[User Consent and Third-Party Applications](https://auth0.com/docs/get-started/applications/confidential-and-public-applications/user-consent-and-third-party-applications#skip-consent-for-first-party-applications)**
>
> Learn how to decouple APIs from applications that consume them and define third-party apps that you don't control or may not trust.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 28, 2022, 8:56pm UTC](https://community.auth0.com/t/ask-for-access-directly-on-loginwithpopup/93601/4 "2022-11-28T20:56:54Z")

</div>

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