Phoenix - Django shared session

Hi there!

We have an older Django application and we plan to rewrite some parts of the application and also implement new features in Phoenix (with Liveview).
This rewrite would include the authentication as well which would be served by the Phoenix app probably with the base from phx.gen.auth.

What would be the best approach to share the Phoenix session with the Django app?
Our current idea is to use the same cookie seralizer and salt in both applications (JSON for example) and write a custom session middleware on django side (and maybe a custom cookie store is also needed on Phoenix side) which would decode the cookie and create the session based on the data from the cookie (and maybe from the database).

This is just an idea from a short investigation, we are still searching how this could be done easily and securily.

Is this the way to go or maybe it would be better to use an SSO solution or something else?

Thanks for the help in advance!