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

Support for other 2 factor apps #17

Open
ghost opened this issue Feb 19, 2014 · 5 comments
Open

Support for other 2 factor apps #17

ghost opened this issue Feb 19, 2014 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 19, 2014

Hey! Will this gem run well alongside of https://github.com/Houdini/two_factor_authentication ? <- Is a really good gem and I would love it if I could use this in conjunction of that.

@xntrik
Copy link
Contributor

xntrik commented Mar 16, 2014

Hi @nahtnam - I haven't investigated this.. I'll try to get an opportunity to do this soon.

@ghost
Copy link
Author

ghost commented Mar 16, 2014

@xntrik That would be awesome! Thanks! :)

@xntrik
Copy link
Contributor

xntrik commented Feb 8, 2015

I'd like to do Yubikey too, like Issue #5

@eimermusic
Copy link

@xntrik are you interesting in something like a "plugin system" where TOTP codes, YubiKey, and possibly SMS could be added and enabled somewhat dynamically? Plugin might be the wrong work. The point being that an app developer could choose to expose one or more of a set of supported code types.

My, now old and messy, fork simply added a branching "verify" method that statically tried TOTP and YubiKey in sequence. Re-implementing that in a more separated and dynamic way would not be terribly hard. I will have to re-implement something equivalent soon and would like to do that in a way that is blessed and maybe even supported by this gem.

https://github.com/eimermusic/devise_otp_authenticator/blob/master/lib/devise_otp_authenticatable/models/otp_authenticatable.rb#L27-L37

The good thing is that TOTP and YubiKey have distinctly different codes making it easy to detect which kind of code you are using. Adding a few other "plugins" and that might fall down if several of them are 6 digits for example.

The activation and setup of each type of code has less magic. You really need a separate activation flow for each type.

TOTP activation involves 2 steps. Showing the QR code and verifying with a code.
YubiKey can be single-step. Focus a form field and press the button on the YubiKey and I get both the token id and can verify any subsequent presses are from the same token and are authentic.

As a side-note. I personally never implemented SMS as a primary factor. Since there is a per-SMS cost we wanted to see if any customer would ask for it. They didn't 😄 but most users don't enable MFA either.

@sahilchopra
Copy link

Any progress for Mongoid 5 support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants