Get backend session data on frontend when both sessions are different configured

In our app, we have configured the session with redis.

and also configured as the different session.

so do not able to get data set in backend at frontend.

Right now there is a requirement that we need very small amount of backend session data on the frontend as we use the common module and we need to use session in common module. But that module gets data set in frontend session correctly but when we set data in backend we are not able to get that data.

How can I overcome this?

Save common data into database/redis and assign it with a user ID. Then get it by ID.

Thanks It worked.