Skip to content
Monkey patch to make both Spree and Refinery auth working together. Code quality is bad. Make it better in your own app. You will not need this anymore as soon as this is merged and in your current version: https://github.com/spree/spree/pull/1512:
Ruby JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
lib
script
spec
.gitignore
.rspec
Gemfile
LICENSE
README.md
Rakefile
Versionfile
spree_refinery_auth.gemspec

README.md

WARNING

Do not use as-is as it is only partially working and not everything was tested. There is no spec either, shame.

Spree Refinery Auth

It is an extension that provides authentication and authorization overrides so that we can use Spree AND Refinery both on the same project. This is most probably not the best solution, but that mostly works.

Requirements

Install

Add to your Gemfile

gem "spree_refinery_auth", :git => "https://github.com/jipiboily/spree_refinery_auth"

In your devise.rb (in config/initializers):

config.authentication_keys = [ :email ]
config.router_name = :spree

Run

$ bundle install
$ rails s

Add those two Roles in you "spree_roles" table:

  • Refinery
  • Superuser

Once your app is launched, first go to the Spree user administration and add those two roles to any user you want.

Notes

You can now log as a Spree user. refinery_users, refinery_roles and refinery_roles_users are not used anymore. You still need the refinery_user_plugins.

Known issues

  • You can log out from withing Spree admin, but it uses Refinery's log out link (#monkeypatch)
  • assigning rights within Refinery doesn't work

- problem with redirection after login from when trying to access "/refinery" at first

Something went wrong with that request. Please try again.