Preserve the attempted path upon failed authentication Modify app.rb route '/auth/unauthenticated' do ensure that the return to path of session[:return_to] will remain even after a failed authentication attempt.
Preserve the attempted path upon failed authentication
Modify app.rb route '/auth/unauthenticated' do ensure that the
return to path of session[:return_to] will remain even after
a failed authentication attempt.

sklise/sinatra-warden-example,sklise/sinatra-warden-example