Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication path does not include the path Spree is mounted at #136

Open
lailsonbm opened this issue Apr 18, 2014 · 3 comments
Open

Authentication path does not include the path Spree is mounted at #136

lailsonbm opened this issue Apr 18, 2014 · 3 comments

Comments

@lailsonbm
Copy link

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

  1. Create a new spree app, as described in the Getting Started guide.
  2. In the routes, change the path of the Spree engine to :at => '/store'.
  3. Install spree_social as described in the README and create a authentication method in the Spree Admin (Facebook, for example).
  4. Notice that the authentication URL is /users/auth/facebook, instead of /store/users/auth/facebook, as expected.
  5. 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.

@lailsonbm
Copy link
Author

The issue seems to be related with Devise + Omniauth: heartcombo/devise#2692

@gduquesnay
Copy link

seems related to #107

@radar
Copy link
Contributor

radar commented May 6, 2014

Agreed, related to #107.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants