I’m trying to integrate Auth0 with dj-rest-auth which is built on top of all-auth.
I correctly set the settings on Django Rest Framework side, but I’m unsure about:
What should the url for AUTH0_URL be? Is it the same as domain from the Auth0 application?
I generated an access_token by setting up a machine to machine application in the Auth0 dashboard (is this the correct access_token to use?)
Context for 1:
Setting the AUTH0_URL = domain does not work for me, which always gives a 401, Unauthorized response to /userinfo endpoint.
If I set it to api/v2/userinfo, the request goes through but I always get a 404 response as {"statusCode":404,"error":"Not Found","message":"Not Found"}
It looks like that SDK is expecting the entire base URL of your tenant. If you go to this doc and log in it will populate the correct base URL: https://auth0.com/docs/api/authentication.
Userinfo is not an an api/v2 endpoint. You can use the same doc I linked above to find your exact URL for the userinfo endpoint.
A M2M access token from the dashboard will not be associated with a user and will not return anything from the userinfo endpoint. This may be the core of your issue. You need to log in to return a user’s access token.