vendredi 15 janvier 2016

How to allow Rails 3 app to read Rails 5 cookies?

I have an old application written on top of Rails 3. The app has a home-rolled authentication system and uses cookies extensively for session, user id, role, etc., information. Although the app is built on Rails 3, it is not a Rails application and the decision has been made to slowly replace it in parts.

We will be putting nginx in front of the old and new apps and using nginx as a pass-through proxy to route different url paths to one of the two applications.

Catch is that the code can't be changed on the Rails 3 app because it will invalidate all existing cookies.

The new, Rails 5, app will be used for authentication and the idea is for it to create a cookie that the old, Rails 3, application can read and use as a single sign on solution.

For the Rails 5 app, we will be using Devise. Rails 5 has encrypted cookies and Rails 3 uses signed encoded cookies. Is there any way of telling Rails 5 to create older Rails 3 style cookies?

Aucun commentaire:

Enregistrer un commentaire