We have two different web applications with different servers, stacks, etc. Let’s call one the Host at host.example.com, and the other the Client at client.example.com.
We want our users to log in to Host, and pass their credentials and some other information (real name, email address, DOB, etc) to Client. What is the best way of doing this? The user accesses Client from a Javascript request when viewing a page on Host.
Criteria:
- The most important criterion is that the changes to Host should be as simple and easy as possible.
- We cannot redirect the user (though their JS requests are fair game)
- The Host must be platform agnostic. The Client is Django on App Engine, but that doesnt really matter I think.
Two options we've thought of:
an API on Client for Host to pass the data. Roughly, on login, the Host fetches login/ on Client, and passes the session ID, along with the data.
Storing the data is a signed or encrypted cookie. Judging from recent discussions about signed cookies in Django, this looks hard to get right.