Comments (5)
Hi there,
I think I'm stuck in the same problem as you were - did you manage to find a solution?
Currently the only response I get is "Incorrect authentication credentials." so could really do with some assistance.
Thanks
from auth0-django-api.
Hi,
I have the same problem, I get is "Incorrect authentication credentials." and don't know how to create valid django user (I created user with the same username as auth0 user_id with replaced '|' by '.').
UPDATE: I added print(f"DEBUG: username={username}")
to jwt_get_username_from_payload_handler() and never seen this message, I suppose handler is not called.
from auth0-django-api.
Has anyone figured out a solution?
I'm confused on this step too. The Auth0 docs and the Django docs are not clear as to whether I simply create a normal Django user and mentally declare it the "remote user," or if there's some other special procedure to follow.
from auth0-django-api.
It's not super clear anywhere, but it becomes clearer if you change the code to this:
from django.contrib.auth import authenticate
def jwt_get_username_from_payload_handler(payload):
username = payload.get('sub').replace('|', '.')
user = authenticate(remote_user=username)
print('user', user, payload)
return username
Django has actually created a User that has no password where the username comes from the auth0 normalized dataset. If you do a search in Users table on the username that is returned you'll find a blank User object! You can then modify the User however you need.
The Auth0 docs shouldn't say Then create a remote user in Django authentication system
because it a remote user is already created.
from auth0-django-api.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️
from auth0-django-api.
Related Issues (14)
- Django API: Wrong instruction in README file
- DJANGO API: Error message when calling endpoints.
- Always returns incorrect authentication details HOT 8
- Users are created in an invalid state HOT 1
- djangorestframework-jwt seems abandoned HOT 2
- (corsheaders.E013) Origin '/' in CORS_ORIGIN_WHITELIST is missing scheme or netloc HOT 1
- auth0 Django API tutorial relies on unmaintained djangorestframework-jwt HOT 3
- Facing issue in decoding the token HOT 1
- tests? HOT 1
- TypeError: descriptor 'encode' requires a 'str' object but received a 'unicode' HOT 3
- rest_framework_jwt no longer maintained HOT 1
- Incompatibility between variables in Django Backend Sample
- Error in backend Django QS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-django-api.