You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Spree engine is mounted at a custom path (such as /store), the authentication path provided by spree_social (/users/auth/:provider by default) does not include this path.
This issue would be easy to solve by setting Spree::SocialConfig[:path_prefix] = 'store/users', but the problem is that the callback path (/users/auth/:provider/callback by default) does include the prefix, so when the :path_prefix is configured in this way, the actual callback route becomes /store/store/users/auth/facebook/callback.
As expected, this makes the callback chain to fail because the app asked the provider to redirect to /store/users/auth/facebook/callback. So, which behavior is correct?
Steps to reproduce the bug
Create a new spree app, as described in the Getting Started guide.
In the routes, change the path of the Spree engine to :at => '/store'.
Install spree_social as described in the README and create a authentication method in the Spree Admin (Facebook, for example).
Notice that the authentication URL is /users/auth/facebook, instead of /store/users/auth/facebook, as expected.
When this path is accessed, it redirects to /users/auth/facebook/callback, but the user gets an error, because this URL does not exists. It is in fact /store/users/auth/facebook/callback.
I'm currently investigating how to fix this. Please just confirm whether the expected behavior is to include the Spree engine path in all paths generated by the spree social.
The text was updated successfully, but these errors were encountered:
When the Spree engine is mounted at a custom path (such as
/store
), the authentication path provided by spree_social (/users/auth/:provider
by default) does not include this path.This issue would be easy to solve by setting
Spree::SocialConfig[:path_prefix] = 'store/users'
, but the problem is that the callback path (/users/auth/:provider/callback
by default) does include the prefix, so when the:path_prefix
is configured in this way, the actual callback route becomes/store/store/users/auth/facebook/callback
.As expected, this makes the callback chain to fail because the app asked the provider to redirect to
/store/users/auth/facebook/callback
. So, which behavior is correct?Steps to reproduce the bug
:at => '/store'
.spree_social
as described in the README and create a authentication method in the Spree Admin (Facebook, for example)./users/auth/facebook
, instead of/store/users/auth/facebook
, as expected./users/auth/facebook/callback
, but the user gets an error, because this URL does not exists. It is in fact/store/users/auth/facebook/callback
.I'm currently investigating how to fix this. Please just confirm whether the expected behavior is to include the Spree engine path in all paths generated by the spree social.
The text was updated successfully, but these errors were encountered: