Hey! Is it possible to get `solidus_auth_devise` w...
# support
t
Hey! Is it possible to get
solidus_auth_devise
working if I have an existing
User
class?
Spree::Auth::Engine.load_seed if defined?(Spree::Auth)
from
db/seeds.rb
results in:
Copy code
Create the admin user (press enter for defaults).
Email [admin@example.com]:
Password [test123]:
rails aborted!
NameError: undefined local variable or method `spree_api_key' for #<Spree::User id: nil, email: nil, persistence_token: nil, perishable_token: nil, last_request_at: nil, login: nil, ship_address_id: nil, bill_address_id: nil, created_at: nil, updated_at: nil, authentication_token: nil, deleted_at: nil>
I tried
rails generate spree:custom_user User
and then re-running
rails db:seed
but to no avail. I also found https://github.com/solidusio/solidus/issues/681 from 2016 but it remains unsolved.
e
For an existing user class you should generate the app with
--with-authentication=none
and then run
bin/rails spree:custom_user User
j
The main thing solidus_auth_devise does is provide a user class, so if you want to use a custom user class, then you should not be using solidus_auth_devise (though it can be a good reference for how to set things up with your custom user class.)
πŸ‘† 1
t
Great, thank you so much guys πŸ™‚
Unfortunately
solidus_starter_frontend
requires it to be installed.
@Jared Norman yeah, I really like the way it's setup and would love to use it. I suppose I could rebase my repo back to when I first created
User
and install all this Solidus stuff before that.
e
you can also skip seeds probably or temporarily fork starter frontend adjusting it to your needs, it’s all in the
template.rb
file
t
Sounds like a plan brotherman, thanks!
πŸ™Œ 1