"unauthorized (Access denied.)" after login

Hi, I’ve followed the steps in the blog article Using Next.js and Auth0 with Supabase to set up Auth0 with a nextjs.

I’ve set up an application in Auth0 as per the article and the nextjs app. Everything is working up until when I log in. I can successfully authenticate with a username/password but then I get an “unauthorized (Access denied.)” error on the callback. If I look in the logs I see the following error

"connection": "Username-Password-Authentication",
  "error": {
    "message": "Access denied.",
    "oauthError": "unauthorized",
    "type": "oauth-authorization"
  },

Are there any extra steps that need to be completed or have I misconfigured something?

Thanks

Hi @rizwan,

Welcome to the Auth0 Community!

Do you have any rules, actions, or hooks running that could be returning this error?

Thanks Dan!

It looks like I had a rogue sample rule setup, removing this solved the problem. :man_superhero:

1 Like

Great! Thanks for following up!

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