ciaranj/connect-auth — pull request #104 by evanp (2012-05-28 19:28:59+00:00)
Title: authenticateUser() should pass results of associateTokenToUser() to callback

The authenticateUser() method of the OAuthServices class was returning
the results of provider.authenticateUser() instead of provider.associateTokenToUser().

This gives incorrect results if associateTokenToUser() doesn't return
the identical object (the in-memory provider does, which is probably why this doesn't come up).

This patch changes the function so that if associateTokenToUser()
returns a non-identical object (say, if you use a database) you get
the most up-to-date object back.