django-rest-framework-passwordless icon indicating copy to clipboard operation
django-rest-framework-passwordless copied to clipboard

PASSWORDLESS_AUTH_TOKEN_CREATOR is not working!

Open DarkcoderSe opened this issue 2 years ago • 2 comments

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.

DarkcoderSe avatar Jun 17 '22 14:06 DarkcoderSe

Already tried?

PASSWORDLESS_AUTH = { 'PASSWORDLESS_AUTO_SEND_VERIFICATION_TOKEN': True, }

peidrao avatar Jun 27 '22 12:06 peidrao

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.

bprachi27 avatar Jul 11 '22 05:07 bprachi27

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

DarkcoderSe avatar Aug 11 '22 09:08 DarkcoderSe

You need to access token using shell. -> PASSWORDLESS_AUTH = { PASSWORDLESS_AUTH_TOKEN_CREATOR='shell.utils.create_authentication_token' }

kugelblitz-slayer avatar Oct 14 '22 07:10 kugelblitz-slayer