robinhood / deux Goto Github PK
View Code? Open in Web Editor NEWMultifactor Authentication for Django Rest Framework
License: Other
Multifactor Authentication for Django Rest Framework
License: Other
Has anybody implemented a Google Authenticator backend for Deux? Seems like it would be common, so wondering if somebody has a starting point rather than me having to start from scratch.
Thanks,
Jake
Is this project still maintained? Looks like the last commit was a while ago
Please, fix problem with pip install
Last version for Django 2.0 have incorrect installing
When using this library with Django 2 like:
from django.urls import include, path
urlpatterns = [
# ...
path('mfa/', include("deux.urls", namespace="mfa")),
]
Fails with:
Specifying a namespace in include() without providing an app_name '
django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.
To make this work we need to add the variable app_name
to
deux/urls.py
deux/oauth2/urls.py
deux/authtoken/urls.py
Looks like a couple of imports are causing issues for users using Twilio's Python Helper Library 6.x.
from deux/notifications.py
from __future__ import absolute_import, unicode_literals
from twilio.rest import TwilioRestClient
from twilio.rest.exceptions import TwilioRestException
these 2 imports have been moved to other modules or renamed.
With the Twillio SMS challenge, foreign numbers (only non-US numbers with the + prefix) do not work with twillio without a "+" prefix. The duex validator throws an validation error if the "+" is in the phone number string. Specifically, I was unable to enable mfa for a uk/french number what twillio required +44 or +33 for the sms/request
register endpoint.
Consider changing phone_number_validator to support international numbers. Using a library like https://github.com/daviddrysdale/python-phonenumbers my be a more holistic approach.
validators.py Regex can look like this
phone_number_validator = RegexValidator( regex=r"^(\+?\d{7,15})$", message=strings.INVALID_PHONE_NUMBER_ERROR )
Please, make a new PyPI release reflecting the Change hard-coded User to settings.AUTH_USER_MODEL.
I am building a Django backend and would love to incorporate this module. After I added it to my settings, I tried running the migration and got a syntax error:
TypeError: init() missing 1 required positional argument: 'on_delete'
From abstract models line 31:
File "/Users/duncancockfoster/Desktop/nftg_django_backend/env/lib/python3.7/site-packages/deux/abstract_models.py", line 31
I noticed that it is only supported up through Python 3.5 - will support be added for Python 3.7? Pretty sure that is the issue here.
i have custom user model (AUTH_USER_MODEL = 'user.User') when i try to run migration it will generate this error
ERRORS:
deux.MultiFactorAuth.user: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.
In requirements/django.txt
the requirement is django
. This makes all tests fail because of all the broken changes in django 2.0, which gets installed as the most current stable django version. This project either needs to merge in a pull request for django 2 support or specify it only works for django <= 1.1.x for now.
I have custom user model and when i hit
./manage.py migrate.
It gives me following error.
deux.MultiFactorAuth.user: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out. HINT: Update the relation to point at 'settings.AUTH_USER_MODEL
I am assuming that this library doesn't support custom user model yet. Any idea how to do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.