Django with custom application returns 403 when trying to authorize

I’m trying to mimic the Django SDK example taken from this link:

Now I have a tenant set up with, amongst others, the “Default App”-application that automatically gets added when creating the tenant, and when testing the app, the environment variables are set as follows:

AUTH0_CLIENT_ID={Default App Client_ID}
AUTH0_CLIENT_SECRET={Default App Client_Secret}

When running the project with these variables with the exact same code that is located on github (auth0-django-web-app/01-Login at master · auth0-samples/auth0-django-web-app · GitHub), then it works, and I get the user-information on screen.

However my problem arises when I switch from the “Default App”-application, to a custom application. Let’s call this application “Custom App” for simplicity. When I try to run the exact same project, however with the only difference being the following:

AUTH0_CLIENT_ID={Custom App Client_ID}
AUTH0_CLIENT_SECRET={Custom App Client_Secret}

then I get the error when trying to login and authorize:

I’ve been struggling to find any solution to this, and I find it difficult to debug what’s going on on the Django-side, and what’s going on on Auth0’s side. Any feedback is appreciated.

Figured out the answer myself thanks to StackOverflow (all hail). The custom application needed to give additional grant types, more specifically Authorization Code. So the solution was to go into the advanced settings of the custom application and select this grant.

1 Like

Thanks for sharing that with the rest of community!