Allow optional for a qualifier in the username of the otpauth #14

Merged
merged 4 commits into from Mar 28, 2014

Conversation

Projects
None yet
2 participants
Contributor

mguymon commented Jan 14, 2014

Add an optional qualifier to google_authenticator_qrcode, make it possible to separate accounts by Rails.env

 google_authenticator_qrcode(user, "-#{Rails.env}")

Bundler was pinned at an earlier version, which I had to remove from the gemspec. Any reason it was pinned?

The test were falling, I had to update the test migrations and views. There is still one test that is sad with:

test_user_is_not_prompted_for_token_again_after_first_login_until_remembertime_is_up(InvitationTest):
NoMethodError: undefined method `to_key' for :user:Symbol
/home/zinger/.rbenv/versions/1.9.3-p448/gemsets/devise/gems/devise-3.2.2/lib/devise/models/authenticatable.rb:204:in `serialize_into_session'
/home/zinger/.rbenv/versions/1.9.3-p448/gemsets/devise/gems/devise-3.2.2/lib/devise.rb:455:in `block (2 levels) in configure_warden!'
/home/zinger/.rbenv/versions/1.9.3-p448/gemsets/devise/gems/warden-1.2.3/lib/warden/session_serializer.rb:26:in `store'
/home/zinger/.rbenv/versions/1.9.3-p448/gemsets/devise/gems/devise-3.2.2/lib/devise/controllers/sign_in_out.rb:38:in `sign_in'
/home/zinger/devel/projects/devour/mguymon-devise_google_authenticator/app/controllers/devise/displayqr_controller.rb:8:in `show'

@xntrik xntrik merged commit b948dc5 into AsteriskLabs:master Mar 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment