LearnBoost/tobi — pull request #72 by smacintyre (2011-12-14 19:00:12+00:00)
Title: External site redirecting back to app creates new browser instance

Example use case:

Testing facebook authentication for web sites:

* browser requests '/auth/facebook' which redirects to app authentication flow
* browser logs into facebook and is redirected back to application

Current behaviour:

* Because the host name doesn't match 'undefined' a new browser is created; the cookies are not transferred, session information is lost.

Expected behaviour:

* Reuse the same browser object used for the initial request to the app. I.e., 'undefined'

Notes:

* If you are passing an app to Browser, then the host argument is ignored. Attempted to set self.host for this purpose but it caused all sorts of woes.
* Added new option externalHost for the hostname of the 'undefined' browser