I am working in a Ruby on Rails project which has implemented authentication mechanism using Devise plugin. I am new to this plugin as well as Ruby. So having a difficulty in fixing a problem in authentications. The problem is, according to current implementation, if a user tries to go access a page in the application without signing in, it redirects the user to Sign In page by saying that he or she should be signed in or signed up before accessing that page. That’s correct. That is the implementation that I need. But what happens is, even if a user directly go to the Login page, this error message is shown. That is not required. Because if a user directly accessing Login page, no point of giving an error message.
Any help will be appreciated.
Thank You.
I am working in a Ruby on Rails project which has implemented authentication mechanism
Share
You call devise
authenticate_user!where you shouldn’t and you do not userequire_no_authenticationYou must make sure this before filter is called in your sessions controller
these are taken care of in devise’s default controllers (e.g, Devise::SessionsController), are you using them?