Skip to content

enefeq/django-authy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-authy

A Django app for integrating with authy

Installation

  1. python setup.py
  2. pip install requirements.txt
  3. add dj_authy to INSTALLED_APPS

Settings

Required

AUTHY_KEY : the authy key for your app (ensure to use production key for production and sandbox key for dev)
AUTHY_IS_SANDBOXED : this should be True when you are using the sandbox

Overview

dj_authy appends authy_profile to the default django User object

user = User.objects.get(pk=1)

profile = user.authy_profile

profile.cellphone = '+4917627266561'
# note the +49 this is important, as profile.cellphone.national_number and profile.cellphone.country_code are derived from this 
profile.save()

service = profile.service  # the authy service wrapper
# service will automatically create the authy.user if we dont already have an authy_id for it
service.verify_token(0000000)  # user entered token;

TODO

  1. tests

About

Integration with Authy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.5%
  • HTML 4.5%