I'm looking to build an app that resides inside an iframe on a larger webpage. I would like to handle user authentication on the larger webpage, and then pass the username/password to the Construct 2 app in the iframe when it loads.
I was considering the following possibilities:
1. Store the authentication information as a php session variable, then modify the Construct 2 index.html to become index.php and load the username and password as javascript variables.
2. Pass the authentication information via a GET request to the Construct 2 index.html (renamed as index.php) and load the username and password as javascript variables.
In either case, I need to somehow create a javascript variable that Construct 2 will recognize in-game.
Any ideas? Can this even be done?
Thanks for your help!