Ask A Question

Notifications

You’re not receiving notifications from this thread.

Spree - What is the secret key of spree? Ask Question

theshashiverma asked in Gems / Libraries

I am working on Ruby on Rails project, and I have already added the devise authentication,

and now I have added the spree in my project by following this Github/spree

I want to know that is there any secret key for the spree that makes it unique.

For example, if person1 is using my project and he sells mobile phones and person2 is also using my project and he sells clothes, so does the products of both the users will be shown on their websites, I mean person1's products will be shown on person2's shopping website or vice-versa, or is there any unique key that differentiates both's websites.

I have been googling about it for many hours and I found the device's config.secret_key but if I made any changes in the key or remove the key project still works.

Thank you

Reply

You would probably need a multitenant plugin for Spree to do that.

Looks like there are a few gems for this:
https://github.com/spree-contrib/spree-multi-domain
https://github.com/spree-contrib/spree_shared

I haven't used Spree in years, so hopefully that helps point you in the right direction!

Reply

Thanks for the reply sir, Please give it a read here i have elaborate my question in more details.

I am creating an admin template and i am giving an e-commerce section in the template. Firstly I build the project using ROR then I add auth using Devise and now I have added the e-commerce section using Spree. And for that, I Followed https://github.com/spree/spree
and when I use this command rails g spree:auth:install it removes all the config settings of devise.rb that I have made for the devise (i followed this for devise setup https://www.sitepoint.com/devise-authentication-in-depth/) and remains only one line Devise.secret_key = " key value "
This is what I have done till now.
And suppose if person 1 buys my template and use to sell mobile phones and person 2 who also buy my template and used to sell clothes. SO HOW MY TEMPLATE DIFFERENTIATE BOTH THE BUYERS. Is there would be any specific key for both the buyers if yes how they would generate it

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.