Did you check the Deep link module: https://docs.mendix.com/appstore/modules/deep-link. If I understand your requirements correctly, this could cover your needs.
You should try out the autologin module in Mx7 to get an idear on how this is build. The Javascript part is the important stuff to grasp how it works. You can then either export the module and import it in Mx8 or rebuild it yourself in Mx8.
The deeplink module alone is not enough to make this work.
Regards,
Ronald
You can make your own custom Java action that would put the forwarded User in Session.
You can do something like:
ISession newSession = Core.initializeSession(Core.getUser(systemContext, user.getName()), "");
and then just make a cookie with that session.