I was having an issue redirecting unauthenticated users to the correct URL: new_spree_user_session_url. Because this route is mounted within Spree, it doesn't detect this route and the FailureApp falls back to redirecting users to the homepage.
I prefer this solution over the one mentioned in the readme, as the devise config is global, while the setting in the routes only effects us. Would you mind to open a PR?
I was having an issue redirecting unauthenticated users to the correct URL:
new_spree_user_session_url
. Because this route is mounted within Spree, it doesn't detect this route and theFailureApp
falls back to redirecting users to the homepage.To fix this, the
router_name
config option forSpree::User
must be set to:spree
. This is already mentioned in the README as a fix for Confirmation errors (https://github.com/solidusio/solidus_auth_devise/commit/997382fcb1f6ed78a201ee7016384cfe71745aea#diff-04c6e90faac2675aa89e2176d2eec7d8R59). If this is in fact a global fix that's required, could therouter_name
be specified in theSpreeUser
Devise setup in routes (https://github.com/solidusio/solidus_auth_devise/blob/master/config/routes.rb#L7) like so: