skip to navigation
skip to content

django-cognalys 1.1

Mobile number verification via missed call .Two factor authentication without SMS gateway

You can follow the below tutorial to know how Cognalys OTP works for web

https://www.youtube.com/watch?v=qalwCPkVQwo

in django settings.py mention below

( Login to the cognalys dashboard and create OTP app )

  1. https://cognalys.freshdesk.com/support/solutions/articles/5000048861-create-new-otp

COGNALYS_ACCESS_TOKEN = Yours

COGNALYS_APP_ID = Yours

COGNALYS_API_VERSION = Yours

INSTALLED_APPS += [‘djcognalys’]

If you need to configure realtime facility of cognalys . you should configure as below :

from django.http import HttpResponse,HttpResponseRedirect from django.views.decorators.csrf import csrf_exempt

from django.conf import settings

@csrf_exempt

def default_callback(request):

token = getattr(settings, ‘COGNALYS_REALTIME_API_TOKEN’, ” )

if request.POST and token != ”:

if request.POST.get(‘token’) == token:

“Your Statement “

return HttpResponse(”, content_type=”text/plain”)

else:

return HttpResponse(‘Not Allowed’, content_type=”text/plain”)