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

there is no possibility use custom sms sender

Open Nemo-Illusionist opened this issue 5 years ago • 4 comments

I want to use SMS sender of another service. for example: smsc.ru

Nemo-Illusionist avatar Mar 21 '19 15:03 Nemo-Illusionist

did you find a way to do this?

param211 avatar Jul 18 '20 14:07 param211

not

Nemo-Illusionist avatar Aug 03 '20 12:08 Nemo-Illusionist

I have just seen this after comment on issue #95 ,

This is possible by mentioning a specific function in configuration, just replace the below value to your function name and it will work

'PASSWORDLESS_SMS_CALLBACK': 'drfpasswordless.utils.send_sms_with_callback_token'

for example in my project with app named testapp in views.py my customized function named send_sms_code then my value would be:

'PASSWORDLESS_SMS_CALLBACK': 'testapp.views.send_sms_code'

bigfat130397 avatar Jan 11 '22 01:01 bigfat130397

@bigfat130397 answer is correct. I tried it and it worked

jaymes15 avatar Feb 28 '22 12:02 jaymes15