heapsource / active_model_otp

Adds methods to set and authenticate against one time passwords (Two-Factor Authentication). Inspired in AM::SecurePassword
MIT License
773 stars 81 forks source link

Using with ruby 1.9.3? #60

Closed raquelhortab closed 5 years ago

raquelhortab commented 5 years ago

Hi there, I'm trying to implement two-factor-authentication with a ruby 1.9.3 app. In rubygems.org it says your gem depends on ruby >=0 but still I cannot use it due to dependencies:

Bundler could not find compatible versions for gem "ruby":
  In Gemfile:
    ruby (~> 1.9.3.0)

    active_model_otp (>= 2.0.1, ~> 2.0) was resolved to 2.0.1, which depends on
      rotp (~> 5.0.0) was resolved to 5.0.0, which depends on
        addressable (~> 2.5) was resolved to 2.7.0, which depends on
          ruby (>= 2.0)

Any idea if there is a workaround for that?

Thank you!

rderoldan1 commented 5 years ago

I think you need to use ruby >= 2.0 and you are currently using 1.9.3

raquelhortab commented 5 years ago

I think you need to use ruby >= 2.0 and you are currently using 1.9.3

Yes, I know that... I was asking whether there was a workaround for that. I believe using active_model_otp version 1.2 works if I manually set an old version of rotp but I might end up using something else.

Thank you anyway

robertomiranda commented 5 years ago

Unfortunately, @raquelhortab as you mention the latest version of the gem requires ruby 2.3 or greater. I've opened a PR clarifying the ruby versions supported by this gem #64.

robertomiranda commented 5 years ago

BTW this is the full list of the ruby versions that OTP has been tested against

https://github.com/heapsource/active_model_otp/blob/8eae6438f0410def8de9a373578598cef03c33ca/.travis.yml#L1-L6

raquelhortab commented 5 years ago

@robertomiranda Thank you for clarifying!