aaronn / django-rest-framework-passwordless

Passwordless Auth for Django REST Framework
MIT License
714 stars 152 forks source link

there is no possibility use custom sms sender #25

Open Nemo-Illusionist opened 5 years ago

Nemo-Illusionist commented 5 years ago

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

param211 commented 4 years ago

did you find a way to do this?

Nemo-Illusionist commented 4 years ago

not

bigfat130397 commented 2 years ago

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'

jaymes15 commented 2 years ago

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