This guide covers using a custom authentication setup with Spree, such as one provided by your own application. This is ideal in situations where you want to handle the sign-in or sign-up flow of your application uniquely, outside the realms of what would be possible with Spree or you have an existing authentication with user accounts present.

This guide assumes that you have a pre-existing model inside your application that represents the users of your application already. This model could be provided by gems such as Devise. This guide also assumes that the application that this User model exists in is already a Spree application.

This model does not need to be called User, but for the purposes of this guide the model we will be referring to will be called User. If your model is called something else, do some mental substitution wherever you see User.

To use your own authentication system with Spree, please follow these steps: