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

Auth issue when getting started #161

Open
alexisagos opened this issue Jun 4, 2021 · 3 comments
Open

Auth issue when getting started #161

alexisagos opened this issue Jun 4, 2021 · 3 comments

Comments

@alexisagos
Copy link

Hi,

I'd like to report issues that I'm encountering with solidus_starter_frontend.
I understand this is the recommended route for newcomers but in my case getting started with it hasn't been very simple.
I have outlined the steps I followed hoping we can fix this and make it easier to get started with the new frontend.
I'm still investigating to get past this issue, any help is very welcome !

With ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]and Rails 6.1.3.2, if we create a fresh rails app rails new test_solidus --skip-javascript:

Add the following gems to the Gemfile:

gem "solidus_core"
gem "solidus_api"
gem "solidus_backend"
gem "solidus_starter_frontend"

Run the installer rails generate solidus:install.

Serve the app rails s.

Then the app works but the styling is missing, login seems to work too..
Screenshot 2021-06-04 at 11 07 26
Screenshot 2021-06-04 at 11 07 37

The auth controllers are present if we check the console rails c:

Running via Spring preloader in process 3709
Loading development environment (Rails 6.1.3.2)
irb(main):001:0> Spree::UserSessionsController
=> Spree::UserSessionsController

So if we want to go the other way and add the files to the project bundle exec solidus_starter_frontend, comment out the solidus_starter_frontend gem in the Gemfile:

gem "solidus_core"
gem "solidus_api"
gem "solidus_backend"
# gem "solidus_starter_frontend"

After bundle install and rails s:
Screenshot 2021-06-04 at 11 20 46

Now, we get a nice store, everything looks good but no auth link in the top bar and auth doesn't work.
If we navigate to "/login", we get No route matches [GET] "/login"

If we check the console rails c:

Running via Spring preloader in process 4442
Loading development environment (Rails 6.1.3.2)
irb(main):001:0> UserSessionsController
Traceback (most recent call last):
        1: from (irb):1
NameError (uninitialized constant UserSessionsController)

It seems that running the installer breaks auth somehow by causing the solidus_auth_devise frontend controllers to not be accessible anymore..
Maybe this could be fixed by moving the files across from the repo but this isn't ideal as we can't benefit from the up-to-date gem.

Does anyone know what could be causing this ?

@waiting-for-dev
Copy link
Contributor

FYI, we're currently revisiting the installation methods available because they aren't reliable, as you found out the hard way. This is a high priority for us. See #162.

@alexisagos
Copy link
Author

Ok thanks, as a workaround I copied the files in the meantime. I will keep an eye on the PR !

@stale
Copy link

stale bot commented Nov 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 11, 2022
@gsmendoza gsmendoza removed the stale label Nov 11, 2022
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