mcueto / djangorestframework-auth0

Library to simply use Auth0 token authentication in DRF within djangorestframework-jwt
MIT License
91 stars 19 forks source link

REPLACE_PIPE_FOR_DOTS_IN_USERNAME error - pip #45

Closed rccoe closed 5 years ago

rccoe commented 5 years ago

Hi,

Installing 0.5.2 via Pip causes an error with the setting variable REPLACE_PIPE_FOR_DOTS_IN_USERNAME. Looking at the package downloaded, settings.py has

` DEFAULTS = { 'JWT_AUTH_HEADER_PREFIX': 'JWT', 'AUTHORIZATION_EXTENSION': False, 'USERNAME_FIELD': 'sub', 'CLIENT_CODE': 'Client_Code', 'CLIENTS': {},

Handlers

'JWT_PAYLOAD_GET_USERNAME_HANDLER':
'rest_framework_auth0.utils.auth0_get_username_from_payload_handler',

} `

Whereas https://github.com/mcueto/djangorestframework-auth0/blob/master/rest_framework_auth0/settings.py has the variable there.

mcueto commented 5 years ago

Fixed! i just uploaded the version 0.5.3 to PyPi

Thanks for contribute!

mcueto commented 5 years ago

I just figured out which was the problem you had.

The problem is wheels cache, and could be fixed by removing ~/.cache/pip/wheels/ folder content and installing this package again(it will recreate the wheels cache).

It seems to be a "normal" problem affecting to some users

More info: https://askubuntu.com/questions/1096847/where-are-cached-python-packages-stored-in-ubuntu https://stackoverflow.com/questions/35169608/in-which-case-pip-install-building-wheel https://github.com/plamere/spotipy/issues/337

canassa commented 5 years ago

Hi @mcueto

I just installed this library with pip install rest-framework-auth0==0.5.3 and I am having the same issue. It's not a cache problem I think as I never installed this library before.

Edit:

Installing directly from master fixed the issue