devise-two-factor / devise-two-factor

Barebones two-factor authentication with Devise
MIT License
1.22k stars 244 forks source link

Issue upgrading to Rails 8.0.0.beta1 #285

Open charlietarr1 opened 1 week ago

charlietarr1 commented 1 week ago

I tried upgrading one of my Rails apps to the new version 8.0.0.beta1 yesterday and encountered some failing tests, which appear to relate to breaking changes in the devise-two-factor gem.

I suspect it may relate to some of the breaking changes that have been introduced, with regards to encrypted attributes.

Obviously a core part of the Rails 8 philosophy is concerned with using some of the built-in functionality for a simpler authentication system, without needing to rely on devise.

That's all well and good, but for those of us with strong pre-existing dependencies on the devise stack, it would be good to ensure backwards compatibility.

I can provide more context, as needed, but thought I'd create a quick issue, in case the gem maintainers are already aware of this issue.

bsedat commented 5 days ago

This project will likely stay focused on a Devise integration.

What errors did you run into on Rails 8? We have a demo app available at https://github.com/devise-two-factor/example-rails_7_1 if someone wanted to try upgrading that.

kjellberg commented 4 days ago
bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Could not find compatible versions

Because devise-two-factor >= 4.1.1 depends on railties ~> 7.0
  and rails >= 8.0.0.beta1 depends on railties = 8.0.0.beta1,
  devise-two-factor >= 4.1.1 is incompatible with rails >= 8.0.0.beta1.
So, because Gemfile depends on rails ~> 8.0.0.beta1
  and Gemfile depends on devise-two-factor >= 6.0, < 6.1,
  version solving has failed.