Auth0 Home Blog Docs

Authorization-code-grant-pkce access_denied error

I’m making a react electron app (at this point a simple auth demo which I plan to apply to a larger project). I’m following: as another thread recommended this for electron problems with auth lock. I am through to step 4. Exchange the Authorization Code for an Access Token, (IE I get my initial Auth Code but cannot get the token) making a request for a token returns {“error”:“access_denied”,“error_description”:“Unauthorized”}. My application is set as a web application, basic token endpoint authorization, and I checked the grant types include authorization code. Here is a gist with my code:

ComponentDidMount checks the url, as its also the same URL as the redirect, if the access_code is present it fires off the call (that fails) to get a token.

How can I resolve this error?

Can you try setting the app type to Native/Mobile? That solved the error for me the other day.

That worked for this issue for me as well thank you.

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