I have tried numerous approaches, but Devise is fiercely resisting my attempts to allow users to log in without leaving the page they’re on, and then to submit the forms available on the site (blog commenting and profile updates).
Basically, the problem is that the CSRF tokens get out of sync because a user isn’t going through the authentication flow anticipated by Devise (it’s skipping through the “New” controller, whether Sessions or Registrations, straight to the “Create” controller).
Is anybody successfully handling AJAX login/registration features within the React On Rails framework with Devise (without going to a single-page framework where the routing is being handled by React Router)? Or, is anybody using ANY AJAX login/registration chains that work successfully with the built-in Rails CSRF handling? I’m not willing to just turn off forgery protection to get this to work.