I've had a simillar problem and I've managed to solve it in the following way:
- issue GET request from site B to site A to fetch a form (with csrf field)
- POST the form back to site A.
The main problem for me was to get cross-site ajax requests to work. To achieve that I've had to configure CORS correctly on the server-side (I've slightly edited this middleware: https://gist.github.com/strogonoff/1369619) and set xmlHttp.withCredentials = true
(where xmlHttp is my XMLHttpRequest object) in the ajax POST function.
I've tested this solution on two diffenet ports on the same IP address, but I think it should also work cross-domain.