heapsource / active_model_otp

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

Verification code is not matched in Staging environment #40

Closed PirunSeng closed 3 years ago

PirunSeng commented 6 years ago

I've followed #46 Two Factor Authentication episode of DriftingRuby and I can get the TFA works well in my development environment. Unluckily, there is a strange behavior when I deploy my feature to Staging environment.

Here is my QRCode generator: qr = RQRCode::QRCode.new(resource.provisioning_uri, level: :h)

The rest of the implementation are the same as described in the epicode.

A strange thing is that the QR code looks differently between development and staging environment. The problem is that I can scan the QR code in staging environment, but when I use that code to verify, it is always not matched.

Can somebody figure whether this is a bug of Active Model OTP or RQRCode gem?

I'm using:

gem 'rails', '4.2.2'
gem 'devise', '~> 3.5', '>= 3.5.2'
gem 'active_model_otp', '~> 1.2'
gem 'rqrcode', '~> 0.10.1'
raychiranjib1 commented 3 years ago

@PirunSeng Is there any update? How did you fix it?

dark-prince commented 3 years ago

This issue was posted more than 2 years back, but still it's opened. Same issue we are also facing. It will be beneficial if someone looks into it.

pedrofurtado commented 3 years ago

Hey guys!

Do you have a minimal reproducible rails app repo, that contains this error inside it? 🤝

It will be more assertive to help you with this situation

pedrofurtado commented 3 years ago

In the meantime, we will close it. Any news about it, a reproducible repo or something like that, we reopen it and make some progress together 🤝