mcueto / djangorestframework-auth0

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

Custom user model #37

Open marten-cz opened 6 years ago

marten-cz commented 6 years ago

Is there any easy way to use different User model for this extension? I would like to use contrib.user for django application and my own .user model just for Auth0 users.

Do you have some idea how to do that? It will be nice to have option to map Auth0 json data to table columns as well.

mcueto commented 5 years ago

A get_user_model() call is used on https://github.com/mcueto/djangorestframework-auth0/blob/master/rest_framework_auth0/authentication.py#L67 to refer to User model, so a custom one can be set if needed. By the way i will test it before close this issue.

Let me know if you tested it

mcueto commented 5 years ago

I suppose the custom user must implement some of the standard User model to be compatible BTW