Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management command for enabling two-factor for a user #77

Open
dessibelle opened this issue Dec 10, 2014 · 2 comments
Open

Management command for enabling two-factor for a user #77

dessibelle opened this issue Dec 10, 2014 · 2 comments

Comments

@dessibelle
Copy link
Contributor

Just a quick thought: aren't the management commands a bit ambigous? disable and status might very well refer to pretty much anything on a Django install. I'd argue that a better naming would be something like:

./manage.py two_factor_status <username>
./manage.py two_factor_disable <username>

On a side note, an enable command would be useful as well, as a way of enforcing two factor auth for all users from day one. Would that even be possible (given that an admin would supply phone numbers, hand out codes etc.)? I'd be happy to submit at PR if that's the case.

@Bouke
Copy link
Collaborator

Bouke commented Dec 10, 2014

Hi @dessibelle thanks for you response. The management commands are listed in their own namespace when listed with help:

[two_factor]
    disable
    status

Although using them might seem a little awkward indeed, and your proposal looks like a good solution.

An enable command would require providing the second factor from the command line. Indeed, a phone number for making calls or sending texts would be the most simple solution. I don't think there would be something from preventing you to do so. I think it would be a nice addition, so feel free to submit a PR. A full PR would also require a small unit test, see also the current test suite.

@dessibelle
Copy link
Contributor Author

Yes, it certainly looks nice when viewing the help section. I guess the better solution would really be if django would honor the app namespace, instead of having to pre-/suffix each command with the app name.

Cool, I'll have a look at an enable command in the upcoming days.

Bouke added a commit that referenced this issue Dec 11, 2014
Django doesn't namespace the commands, which make them
look ambiguous when used. Including `two_factor_` in the name
makes them unambiguous.

See also #77.
@Bouke Bouke changed the title Management command names Management command for enabling two-factor for a user Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants