A Meteor package designed to links social network accounts without any hassles.
- Link additional social network accounts.
- Don't modify any Meteor core packages.
- Don't force users to add additional Meteor packages that they are not going to use.
Install in Meteor with:
meteor add bozhao:link-accounts
You will call this on the page where you allow your users to connect to other services. This method will be triggered after they click the appropriate connect button.
options
is expecting configuration object. Most often that is going to be: { loginStyle: 'popup' }
The options
object accepts linkMessage
key where you can set message for signature.
Given the userId
and the name of the service (serviceName
) as it is named in the user document (most often lower case name of the service).
There are 3 hooks available to you on the server at various time during the link process. All are triggered on the server side.
Called before user account is linked with service. The hook will receive object with the following parameters:
type
- service nameserviceData
- data received from the service provideruser
- current user objectserviceOptions
- options that were used to call the service
If you return false the linking will be interrupted.
Called after user has been linked with a service. The hook will receive object with the following parameters:
type
- service nameserviceData
- data received from the service provideruser
- updated user objectserviceOptions
- options that were used to call the service
Called after user is unlinking the service. The hook will receive object with the following parameters:
type
- service name that was unlinkeduser
- user object before unlinking
-
Piggyback on existing Meteor oauth login system. Use login handler.
-
We do not allow link different account from same service for now. For example, you could not link with 2 different Github accounts.
-
Save the linked service info on user.services, instead of creating new field on user object. This allows user logins the application from linked services.
-
Don't create a temporary user account and then merge it.
- accounts-meteor-developer
- accounts-github
- accounts-facebook
- accounts-google
- accounts-twitter
- accounts-meetup
- accounts-weibo
- btafel:accounts-facebook-cordova
- bozhao:accounts-instagram
- mrt:accounts-vk
- mikepol:accounts-ok
- mikepol:accounts-mailru
- pauli:linkedin-oauth
- garbolino:accounts-soundcloud
- alexbeauchemin:accounts-twitch
- nicolaiwadstrom:meteor-angellist
- acemtp:meteor-slack
- xinranxiao:meteor-spotify
- gcampax:accounts-dropbox
- pcooney10:accounts-venmo
- leonzhang1109:accounts-wechat
- leonzhang1109:accounts-qq
- storyteller:accounts-line
- lindoelio:accounts-office365 / ermlab:accounts-office365
- quave:accounts-apple / bigowl:accounts-apple
- freedombase:web3-login
- storyteller:accounts-discord
MIT
Yu Bozhao 💻 📖 🚧 |
Jan Dvorak 💻 📖 🚧 |
Jan Küster 🚧 |