stefanbuck/sails-social-auth-example — pull request #6 by naman34 (2013-11-16 20:33:02+00:00)
Title: Added conditional INT typecasting for correct login

The User model saves the 'uid' as an integer, services often send the profile id as string. ParseInt should work on its own, but for best compatibility and to account for possible changes to the User model this should be the best way to find if the user exists already in the model.