django-rest-framework-passwordless
django-rest-framework-passwordless copied to clipboard
PASSWORDLESS_AUTH_TOKEN_CREATOR is not working!
Hi, I have implemented the Knox authentication as my primary authentication and I also added the drfpasswordless. I am trying to add my custom knox authentication token as default token in settings.py. But, PASSWORDLESS_AUTH_TOKEN_CREATOR is not working as it expected. I don't know what cause this issue.
So far, I have added Knox as my primary Authentication token in settings.py and Also added the PASSWORDLESS_AUTH_TOKEN_CREATOR with two different techniques.
In my settings.py
Tried with this:
DEFAULTS = { 'PASSWORDLESS_AUTH_TOKEN_CREATOR': 'myapp.utils.create_authentication_token' }
Also tried with this:
PASSWORDLESS_AUTH_TOKEN_CREATOR = 'myapp.utils.create_authentication_token'
Still, It keeps sending the REST framework default token in /auth/token response.
Already tried?
PASSWORDLESS_AUTH = { 'PASSWORDLESS_AUTO_SEND_VERIFICATION_TOKEN': True, }
passwordless_auth_token_createor is working. I write like this.
PASSWORDLESS_AUTH={ PASSWORDLESS_AUTH_TOKEN_CREATOR='shell.utils.create_authentication_token' } try this. it work for me.
passwordless_auth_token_createor is working. I write like this.
PASSWORDLESS_AUTH={ PASSWORDLESS_AUTH_TOKEN_CREATOR='shell.utils.create_authentication_token' } try this. it work for me.
Thanks works now
You need to access token using shell.
-> PASSWORDLESS_AUTH = { PASSWORDLESS_AUTH_TOKEN_CREATOR='shell.utils.create_authentication_token' }