On my ruby on rails 4.2 app, I am using Devise to authenticate (sign in and sign up) users. Let's take an example: when a user signs ups, for example, he's automatically redirected to the homepage as a signed-in user.
I need to provide for the case of users who would have cookies (and other Web storage) blocked or deactivated.
Today, if it is the case and cookies are blocked, when he signs up on my sign-up page, he will still be redirected to the homepage but he won't be signed-in: devise fails to work.
How can Rails identify server-side that cookies are disabled so that I can show a nice message to the user after he submits the signup/in form such as "please activate cookies to proceed".
I would like a clean solution that integrates well with Devise (vs some front end detection that need to be passed from javascript to the server and seems like a "dirty" hack :-).
Note: This is the strategy used by Google by the way even if for them it takes place in a 2-step form.