All Projects β†’ solidusio β†’ solidus_auth_devise

solidusio / solidus_auth_devise

Licence: BSD-3-Clause license
πŸ”‘ Devise authentication for your Solidus store.

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to solidus auth devise

solidus paypal braintree
πŸ’³Integrate Solidus with Braintree, including PayPal and Apple Pay support
Stars: ✭ 30 (-34.78%)
Mutual labels:  ecommerce, solidus, ecommerce-platform, solidus-extensions
solidus braintree
Braintree v.zero support for solidus
Stars: ✭ 19 (-58.7%)
Mutual labels:  ecommerce, solidus, ecommerce-platform
Solidus
πŸ›’Solidus, Rails eCommerce System
Stars: ✭ 3,985 (+8563.04%)
Mutual labels:  ecommerce, solidus, ecommerce-platform
Coreshop
CoreShop - Pimcore eCommerce
Stars: ✭ 193 (+319.57%)
Mutual labels:  ecommerce, ecommerce-platform
Sylius Standard
Open Source eCommerce Application on top of Symfony
Stars: ✭ 165 (+258.7%)
Mutual labels:  ecommerce, ecommerce-platform
Pimcore
Open Source Data & Experience Management Platform (PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce)
Stars: ✭ 2,352 (+5013.04%)
Mutual labels:  ecommerce, ecommerce-platform
Spree
Open Source headless multi-language/multi-currency/multi-store eCommerce platform
Stars: ✭ 11,571 (+25054.35%)
Mutual labels:  ecommerce, ecommerce-platform
Scipio Erp
Your Online Business Kit - Build your own business applications. Create your own online shop. Customize to your own needs.
Stars: ✭ 247 (+436.96%)
Mutual labels:  ecommerce, ecommerce-platform
Ecommwar
A leaderboard of the top open-source e-commerce platforms. Promoting the bests for building reliable stores.
Stars: ✭ 203 (+341.3%)
Mutual labels:  ecommerce, ecommerce-platform
Arastta
Solid, Free, Open Source, Community Driven eCommerce
Stars: ✭ 251 (+445.65%)
Mutual labels:  ecommerce, ecommerce-platform
crimson commerce
An OpenSource Ecommerce platform on the Elixir/Phoenix stack, which aims to leverage the power of functional programming for ecommerce.
Stars: ✭ 74 (+60.87%)
Mutual labels:  ecommerce, ecommerce-platform
Laravel Ecommerce
Laravel open source e-commerce system.
Stars: ✭ 163 (+254.35%)
Mutual labels:  ecommerce, ecommerce-platform
Orocommerce
Main OroCommerce package with core functionality.
Stars: ✭ 148 (+221.74%)
Mutual labels:  ecommerce, ecommerce-platform
Awesome Vue Storefront
πŸŽ‰ A curated list of awesome things related to Vue Storefront
Stars: ✭ 186 (+304.35%)
Mutual labels:  ecommerce, ecommerce-platform
Reaction
Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
Stars: ✭ 11,588 (+25091.3%)
Mutual labels:  ecommerce, ecommerce-platform
Shopper
An eCommerce administration built with Laravel 5 for create online shop.
Stars: ✭ 205 (+345.65%)
Mutual labels:  ecommerce, ecommerce-platform
freshcom-api
Deprecated
Stars: ✭ 43 (-6.52%)
Mutual labels:  ecommerce, ecommerce-platform
E-commerceRetailerFYP
Android E-commerce Platform. Allow retailer to post product, manage order, chat and view report
Stars: ✭ 31 (-32.61%)
Mutual labels:  ecommerce, ecommerce-platform
MyOOS
MyOOS [Shop system] Repository
Stars: ✭ 26 (-43.48%)
Mutual labels:  ecommerce, ecommerce-platform
Saleor
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.
Stars: ✭ 14,720 (+31900%)
Mutual labels:  ecommerce, ecommerce-platform

Solidus Auth Devise

CircleCI codecov

Provides authentication services for Solidus, using the Devise gem.

Usage

Installation

Add solidus_auth_devise to your Gemfile:

gem 'solidus_auth_devise'

Then, run bundle install.

After that's done, you can install and run the necessary migrations, then seed the database:

bundle exec rake solidus_auth:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed

Default Username/Password

As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values are [email protected] and test123, respectively.

Confirmable

To enable Devise's Confirmable module, which will send the user an email with a link to confirm their account, you must do the following:

  • Add this line to an initializer in your Rails project (typically config/initializers/spree.rb):
Spree::Auth::Config[:confirmable] = true
  • Add a Devise initializer to your Rails project (typically config/initializers/devise.rb):
Devise.setup do |config|
  # Required so users don't lose their carts when they need to confirm.
  config.allow_unconfirmed_access_for = 1.days

  # Add any other devise configurations here, as they will override the defaults provided by solidus_auth_devise.
end

Using in an existing application

If you are installing Solidus inside of a host application in which you want your own permission setup, you can do this using the register_ability method.

First create your own CanCan Ability class following the CanCan documentation.

For example: app/models/super_abilities.rb

class SuperAbilities
  include CanCan::Ability

  def initialize user
    if user.is? "Superman"
      can :stop, Bullet
    end
  end
end

Then register your class in your spree initializer: config/initializers/spree.rb

Spree::Ability.register_ability(SuperAbilities)

Inside of your host application you can then use CanCan like you normally would.

<% if can? :stop Bullet %>
  ...
<% end %>

Development

Testing the extension

First bundle your dependencies, then run bin/rake. bin/rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using bin/rake extension:test_app.

bin/rake

To run Rubocop static code analysis run

bundle exec rubocop

When testing your application's integration with this extension you may use its factories. Simply add this require statement to your spec/spec_helper.rb:

require 'solidus_auth_devise/testing_support/factories'

Or, if you are using FactoryBot.definition_file_paths, you can load Solidus core factories along with this extension's factories using this statement:

SolidusDevSupport::TestingSupport::Factories.load_for(SolidusAuthDevise::Engine)

Running the sandbox

To run this extension in a sandboxed Solidus application, you can run bin/sandbox. The path for the sandbox app is ./sandbox and bin/rails will forward any Rails commands to sandbox/bin/rails.

Here's an example:

$ bin/rails server
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop

Updating the changelog

Before and after releases the changelog should be updated to reflect the up-to-date status of the project:

bin/rake changelog
git add CHANGELOG.md
git commit -m "Update the changelog"

Releasing new versions

Please refer to the dedicated page on Solidus wiki.

License

Copyright (c) 2022 Solidus Team, released under the New BSD License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].