solidusio / solidus_auth_devise

🔑 Devise authentication for your Solidus store.
http://solidus.io
BSD 3-Clause "New" or "Revised" License
53 stars 128 forks source link

fix routing and location storage #230

Closed cpfergus1 closed 1 year ago

cpfergus1 commented 1 year ago

Description

Fixes the new store location feature introduced in https://github.com/solidusio/solidus_auth_devise/pull/228

Motivation and Context

We replaced the method #redirect_back_or_default and the class user_last_url_storer because Devise already provides functionality similar to redirect_back_or_default. After emerging PR#228 We noticed that the redirects were not working as intended and investigated the cause. We found a couple of issues that we missed and needed to be rectified, specifically:

We need to Authenticate the user and not rely on authorization Utilize spree_user instead of spree_current_user since that is the scope being utilized Use implemented custom paths instead of devise helpers for certain routes

How Has This Been Tested?

The current test suite covers the changes made in the PR - quadrupled checked 👍

Types of changes

Checklist:

cpfergus1 commented 1 year ago

Closing in favor of https://github.com/solidusio/solidus_auth_devise/pull/231