Open emeagenciadigital opened 5 years ago
no doubt. This project is very brittle. The underlying projects are also barely working. If you want to help submit fixes please do and they will be merged. Sadly I haven't seen any projects as robust as ruby on rails or django for the nodejs ecosystem.
If the user register with user and password and laters wants to log in with Facebook, the access token generated by feathers does not contain the userID. (Decoded in jwt.io)
To test just set to NULL the facebook-tokenId on the database and try to login with Facebook. This will generate you an access token that doesn't include the userID. If you try to login again it will work because now the database will contain the facebook-tokenId .
It works as expected if the user registers with Facebook or if it already had the facebook-tokenId .
This strategy always goes through the service /users create method so on a before hook we are first validating if the email already exist and if it does we update the field facebook-tokenId and facebook-Token .