heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.85k stars 5.53k forks source link

Devise + sequel #5606

Closed dawidof closed 2 months ago

dawidof commented 1 year ago

Environment

Current behavior

rails generate devise user

<internal:/Users/dmytro/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- devise/orm/sequel (LoadError)
    from <internal:/Users/dmytro/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /Users/dmytro/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
    from /Users/dmytro/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in `require'

Expected behavior

Any plans to connect devise with sequel??

janko commented 11 months ago

Your best chance is probably sequel-devise gem. However, that's just a hack, the gem just makes Sequel models quack enough like Active Record objects for Devise to work. Devise tried to be ORM-agnostic by using the orm_adapter gem, but in reality it still calls Active Record methods directly, bypassing the abstraction.

If you want an authentication framework built on top of Sequel, I highly recommend Rodauth. It has a Rails integration, which includes generators and other niceties.

carlosantoniodasilva commented 2 months ago

I don't know much about Sequel tbh, but would consider a patch to support it if the changes aren't much. For now, I've taken notes as a potential feature to support in the future.