pelargir / auto-session-timeout

Provides automatic session timeout in a Rails application.
MIT License
126 stars 63 forks source link

No route matches #32

Open ViciousMagician opened 3 years ago

ViciousMagician commented 3 years ago

I had everything working or so i though.. Site worked fine until i entered Solidus.

routes.rb ` mount Spree::Core::Engine, at: '/ecommerce'

get 'active' => 'sessions#active' get 'timeout' => 'sessions#timeout'

`

When going into anything in Solidus it would throw: ActionController::UrlGenerationError in Spree::OrdersController#edit No route matches {:action=>"active", :controller=>"sessions"}

I was able to get around this by adding these lines to application_controller.rb

` def timeout_url '/timeout' end

def active_url '/active' end`

pelargir commented 3 years ago

How is your sessions controller defined? Are you using Devise or did you roll your own authentication? If you can provide a bit more detail I'd like to help.

ViciousMagician commented 3 years ago

Unfortunately I inherited this project and its a roll your own auth. I tried both adding my own and auto_session_timeout_actions. Neither would work without adding the above however should it timeout while inside solidus the session gets destroyed but will not redirect to login. The redirection works great outside of the Solidus.

pelargir commented 3 years ago

If you're able to provide a sample project that demonstrates the bug that would be extremely helpful, but if not I'll try reproducing the problem myself when I have time.