Using Devise
If you’re currently using Devise for authentication, you can follow the steps below to integrate Spree with your existing authentication system. Firstly set yourUser
class as Spree.user_class
in your config/initializers/spree.rb
file:
lib/spree/authentication_helpers.rb
that serves as a bridge between Spree and your existing authentication system routes. You can then use this file to customize the routes to your liking. It should automatically pick up standard Devise routes.
Secondly, this generator will add necessary modules to your User
model.
User
model can be used as a Spree user.
This generator will also add 2 new lines to your Spree initializer file:
Using Custom Authentication
If you’re using a custom authentication system, you can follow the steps below to integrate Spree with your existing authentication system. Firstly set yourUser
class as Spree.user_class
in your config/initializers/spree.rb
file:
lib/spree/authentication_helpers.rb
that serves as a bridge between Spree and your existing authentication system routes. You will need to customize this file to fit your needs.
Secondly, this generator will add necessary modules to your User
model.