solidusio / solidus_starter_frontend

🎨 Rails-based starter kit for your Solidus storefront.
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

Auth issue when getting started #161

Open alexisagos opened 3 years ago

alexisagos commented 3 years ago

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 commented 3 years ago

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 https://github.com/nebulab/solidus_starter_frontend/pull/162.

alexisagos commented 3 years ago

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

stale[bot] commented 1 year ago

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.