Use the Accounts.onCreateUser()
callback on the server to normalize the user document before it's saved in the database.
Meteor, logging in with Facebook but accessing profile
题
Please advise as the best way to handle the following situation:
I created a custom sign-up form with:
- Firstname
- Lastname
- Password
- More
These are stored in the "Profile" array in the user account document.
I just tied in Facebook login to my app and it worked, however it stores things differently than I initially setup. I'm using handlebars helpers to display a users firstname, but Facebook info is stored as "name: full name"
What's the best way to deal with this?
So when a user creates an account using the meteor password system:
{{currentUser.profile.firstname}} <- works
But if they use Facebook it does not, becaues it's stored in "name" instead of firstname.
Just some ideas or best practices needed.
Thank you!
解决方案
不隶属于 StackOverflow