We have a Rails app which is the main site, but we created a separate app in Golang that handles a lot of other real-time functionalities like Video and Audio Calls, Messaging and Whiteboard sections.
The problem we have now is we don't know how to share web sessions between the 2 apps. When you switch in between the Rails app to Golang. Just like going from Gmail to Google Drive to YouTube, the session remains the same even though these apps run in different subdomains and sometimes different languages.
I was able to add the session from Rails + Devise/Warden into the browser cookie but the cookie is encrypted. How do I decrypt or use this cookie to authenticate the user in Go?
Could you guys please share with me how you would approach solving this problem in your own app?
Using this answer I was able to get the session cookie to appear both in the main site in React + Rails and the subdomain in React + Golang, but the cookie is encrypted, how do we decrypt/get the values in there? for example the user_id?