We allow external OAuth using PHP APIs to several social networks. When the user choose external authentication, a new window (popup) is opened, where the application asks authorization. Then, still in the popup, the user is redirected using the callback url given to the external application. The callback script performs various tasks (login, checks, synchronization,...) that may requires some time, before the popup is closed, and the mother page updated. While those task are performed, the popup is just blank.
What I would like is to display a "please wait..." message on the popup when the callback url is called. One solution is that the popup just display the message and pass an AJAX, but as I don't know the parameters of the callback (that depends on the external application), I would like to avoid this. Is there any way to do it with only one PHP script ?