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

Getting BSON::InvalidStringEncoding error #161

Open
carloscarcamo opened this issue Nov 6, 2019 · 0 comments
Open

Getting BSON::InvalidStringEncoding error #161

carloscarcamo opened this issue Nov 6, 2019 · 0 comments
Labels
question < v5 v5 of devise-two-factor is a major change to support Rails 7 and beyond

Comments

@carloscarcamo
Copy link

carloscarcamo commented Nov 6, 2019

Hello, I'm getting an error when enabling Two-Factor Authentication:

current_user.otp_required_for_login = true
current_user.otp_secret = User.generate_otp_secret
current_user.save!

After running that code I get:

BSON::InvalidStringEncoding: String not valid UTF-8
from /~/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bson-1.12.5/lib/bson/bson_c.rb:20:in `serialize'

Any suggestion on how to fix this would be appreciated,

Thanks,

@bsedat bsedat added question < v5 v5 of devise-two-factor is a major change to support Rails 7 and beyond labels Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question < v5 v5 of devise-two-factor is a major change to support Rails 7 and beyond
Projects
None yet
Development

No branches or pull requests

2 participants