If you installed Spree following the Quickstart guide, you can completely skip this step - you are all set and integrated with the Devise gem. However if you’re adding Spree to an existing application that has its own authentication system, you will need to follow these steps.Documentation Index
Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
Use this file to discover all available pages before exploring further.
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.

