auth0-samples/auth0-python-web-app

Auth0 Python Web App Sample

Nareshj17 opened this issue · 2 comments

Hello All,

@lepture @aaguiarz @alexisluque . I was trying to execute the example here in git for python web sample. But I'm facing the below error and not sure how to rectify it, since I'm a beginner in python. Could you please help me in resolving it, as I need it much badly.

error -> AttributeError: module 'constants' has no attribute 'AUTH0_CALLBACK_URL'

I'm using jupyter notebook to work on it and I have installed all the required dependencies as well. Please guide me. Thank you much in advance.

Regards,
Naresh E.

Hi,

The sample tries starting a server in your machine, I don't think it will work from a Jupyter notebook.

In any case, you need to set the configuration variables defined in the constant.py file (https://github.com/auth0-samples/auth0-python-web-app/blob/master/01-Login/constants.py), you can find guidelines on how to do it here https://auth0.com/docs/quickstart/webapp/python.

From your application's settings in the Auth0 dashboard:

AUTH0_CLIENT_ID
AUTH0_CLIENT_SECRET
AUTH0_DOMAIN

AUTH0_AUDIENCE leave it empty
AUTH0_CALLBACK_URL should be set to your web app's callback URL, if you use the sample should be server:port/callback.

Hello,

If you are still having an issue with this I'd suggest posting on our community site. This is not the best channel for us to provide help with such questions.