Closed EmCousin closed 4 years ago
Hey @EmCousin, thanks for reporting this issue. It looks a legit bug to me and I'll try to investigate further.
@EmCousin can you please give a try to this PR's branch https://github.com/solidusio/solidus_auth_devise/pull/171 and let us know if this fix works?
@EmCousin after a second thought, with the help of @tvdeyen, we realized that this extension is meant to be used with the Spree::User
class. The possibility to change this class is left to users that do not need this extension and have a custom devise installation (or other authentication systems). Can you please provide more information about your use case?
Hi @kennyadsl, first, thank you for your answers.
About my use case : I plugged the solidus
gem along with solidus-reviews
, which requires solidus-auth-devise
as a dependency, on a Rails app that already has Devise installed.
This installation is rather classic, with a database_authenticatable
model User
.
I'm following these guidelines to do so. It works perfectly, except for the Spree.user_class
step, reason for which I initiated this issue.
Is that information relevant enough?
Sure, thanks for the detailed explanation.
I think the issue here is with solidus_reviews
, it should not be dependant on solidus_auth_devise
.
I'm having a look at that gem right now to see if we can get read of the solidus_auth_devise
dependency and release a new version. I'll keep you posted.
I've opened https://github.com/solidusio-contrib/solidus_reviews/pull/53 which should allow you to use the extension without solidus_auth_devise
. When it will be merged, we'll release a new version of solidus_reviews
that you can use.
Hi,
I'm following the guidelines to set a custom auth system on my app's backend.
I have this line in my
config/initializers/spree.rb
file :but when booting the app or running the rails console, hitting
Spree.user_class
still returnsSpree::User
.I believe this is due to this line, that is executed after loading the initializers, thus setting
Spree.user_class
back toSpree::User
.I've been able to workaround this issue by overriding the related initializer declaration in my main config file:
Questions
Thanks in advance!