jaredhanson/passport-oauth — pull request #7 by gregjacobson (2012-06-30 20:24:02+00:00)
Title: Add ability to access underlying response from auth. server 

It does not seem that the response from the oAuth authorization server is
made accessible.

There are some oAuth implementations that return additional information
from the authorization server when the initial request is made.
This information is only available in the initial response and
cannot be easily be recovered later (if at all) using additional calls against
the api with the access token. SalesForce may be an example of this approach.
Force.com returns an id parameter in addition to the access token in the
response that allows access to useful information about the logged
in user (using the Salesforce Identity Service).

If the id parameter is not captured at that point you may not be able
to easily access additional information about the
logged in user such as their email address, etc. In the case of
SalesForce it appears that this parameter can be rebuilt from
another query against the SalesForce servers but it would be
much easier if I could access it the first time it was sent from
the server.

I would like to add this functionality to the Force.com strategy
created by @joshbirk but I need that additional item to complete
this enhancement.

As a result, I have modified this project to optionally
include the results from the authorization server
as part of the verify callback. Another possible approach
might be to expose the response in the Load User Profile function.