Problem with logging credentials

Hello, I’m new with Auth0 working on a project and got into this particular problem and have no idea how to resolve it… I was trying to implement an Action in a post-login and was told to update the authentication method so i was able to request a token from the api


The Action post-login works perfect but the problem is that after the user logins a message “Oops… Unauthorized” appears

{
    "error": "access_denied",
    "error_description": "Unauthorized"
}

I thought this was because of the action so I removed it only to realize that the problem continued, so it happens when I change the authentication method… I can’t find what it needs to be fixed or where to solve this.
Searching in the project I found this Config which seems to be fine but because of the change in the authentication maybe i need to send another param that I’m missing?

const providerConfig = {
  domain: config.domain,
  clientId: config.clientId,
  onRedirectCallback,
  authorizationParams: {
    redirect_uri: window.location.origin,
    ...(config.audience ? { audience: config.audience } : null),
  },
};

Sorry if this is some kind of rookie mistake with an easy solution but I’m really new in this and I get lost easily :sweat_smile:
Thanks in advance!

Hi @shibui,

Welcome to the Auth0 Community!

access_denied happens when Auth0 cannot issue a token (Auth0 refuses the authorization).

For a demonstration of this issue, refer to the following video.

If receiving an access_denied error, first check the rules. Another possible reason is that an incorrect CLIENT_SECRET or audience is passed in.

I recommend capturing this flow in a HAR file and analyzing the result. For guidance on how to create a HAR file, refer to the following doc:

Also, please check these articles for solutions:

Thanks,
Timotei

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