• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Meteor link account package. based on this PR https://github.com/meteor/meteor/pull/1133

Meteor Link Accounts

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

A Meteor package designed to links social network accounts without any hassles.

Goals

  • 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

Install in Meteor with:

meteor add bozhao:link-accounts

Usage

Client side

Meteor.linkWith[ServiceName](options, callback)

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' }

freedombase:web3-login

The options object accepts linkMessage key where you can set message for signature.

Server side

Accounts.unlinkService(userId, serviceName)

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).

Hooks

There are 3 hooks available to you on the server at various time during the link process. All are triggered on the server side.

Accounts.beforeLink

Called before user account is linked with service. The hook will receive object with the following parameters:

  • type - service name
  • serviceData - data received from the service provider
  • user - current user object
  • serviceOptions - options that were used to call the service

If you return false the linking will be interrupted.

Accounts.onLink

Called after user has been linked with a service. The hook will receive object with the following parameters:

  • type - service name
  • serviceData - data received from the service provider
  • user - updated user object
  • serviceOptions - options that were used to call the service

Accounts.onUnlink

Called after user is unlinking the service. The hook will receive object with the following parameters:

  • type - service name that was unlinked
  • user - user object before unlinking

Design notes:

  1. Piggyback on existing Meteor oauth login system. Use login handler.

  2. We do not allow link different account from same service for now. For example, you could not link with 2 different github accounts.

  3. Save the linked service info on user.services, instead of creating new field on user object. This allow user logins the application from linked services.

  4. Don't create a temporary user account and then merge it.

Support Accounts Package

Official packages

  • accounts-meteor-developer
  • accounts-github
  • accounts-facebook
  • accounts-google
  • accounts-twitter
  • accounts-meetup
  • accounts-weibo

Community packages

  • btafel:accounts-facebook-cordova
  • bozhao:accounts-instagram
  • mrt:accounts-vk
  • mikepol:accounts-ok
  • mikepol:accounts-mailru
  • jonperl:accounts-linkedin (depracated) / 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

License

MIT

More Repositories

1

meteor-autoform

AutoForm is a Meteor package that adds UI components and helpers to easily create basic forms with automatic insert and update events, and automatic reactive validation.
JavaScript
1,439
star
2

Meteor-CollectionFS

Reactive file manager for Meteor
JavaScript
1,051
star
3

meteor-collection2

A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
JavaScript
1,024
star
4

meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
JavaScript
920
star
5

meteor-simple-schema

Meteor integration package for simpl-schema
JavaScript
920
star
6

meteor-collection-hooks

Meteor Collection Hooks
JavaScript
657
star
7

ground-db

GroundDB is a thin layer providing Meteor offline database and methods
JavaScript
569
star
8

meteor-user-status

Track user connection state and inactivity in Meteor.
JavaScript
557
star
9

meteor-publish-composite

Meteor.publishComposite provides a flexible way to publish a set of related documents from various collections using a reactive join
JavaScript
553
star
10

raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
JavaScript
515
star
11

meteor-tabular

Reactive datatables for large or small datasets
JavaScript
363
star
12

meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
CoffeeScript
350
star
13

meteor-scss

Node-sass wrapped to work with meteor.
JavaScript
311
star
14

meteor-partitioner

Transparently divide a single meteor app into several different instances shared between different groups of users.
CoffeeScript
152
star
15

meteor-timesync

NTP-style time synchronization between server and client, and facilities to use server time reactively in Meteor applications.
JavaScript
118
star
16

mongo-collection-instances

🗂 Meteor package allowing Mongo Collection instance lookup by collection name
JavaScript
73
star
17

Meteor-EventEmitter

Client and server event emitter
JavaScript
72
star
18

meteor-postcss

PostCSS for Meteor
JavaScript
68
star
19

meteor-mocha

A Mocha test driver package for Meteor 1.3+. This package reports server AND client test results in the server console and can be used for running tests on a CI server or locally.
JavaScript
67
star
20

meteor-elastic-apm

Meteor Elastic APM integration
JavaScript
57
star
21

organization

Discussions on organization of the organization 🎩
41
star
22

meteor-schema-index

Control some MongoDB indexing with schema options
JavaScript
38
star
23

meteor-publication-collector

Test a Meteor publication by collecting its output.
JavaScript
33
star
24

meteor-collection-extensions

Safely and easily extend the (Meteor/Mongo).Collection constructor with custom functionality.
JavaScript
31
star
25

stratosphere

Meteor private package server
JavaScript
28
star
26

meteor-method-hooks

JavaScript
26
star
27

meteor-autoform-select2

Custom select2 input type for AutoForm
JavaScript
25
star
28

meteor-autoform-bs-datepicker

Custom "bootstrap-datepicker" input type for AutoForm
JavaScript
25
star
29

react-router-ssr

Simple isomorphic React SSR for Meteor with subscribed data re-hydration
JavaScript
24
star
30

denormalize

Simple denormalization for Meteor
JavaScript
20
star
31

meteor-autoform-bs-datetimepicker

Custom bootstrap-datetimepicker input type with timezone support for AutoForm
JavaScript
17
star
32

meteor-packages

Client for Meteor Package Server API
JavaScript
14
star
33

Packosphere

A Meteor package explorer for you, and if you are so inclined to help build it, by you.
TypeScript
13
star
34

meteor-schema-deny

Deny inserting or updating certain properties through schema options
JavaScript
12
star
35

check-npm-versions

Enforces "peer" npm dependencies in Meteor 1.3+ Atmosphere packages.
TypeScript
11
star
36

meteor-browser-tests

A helper package for Meteor test driver packages. Runs client tests in a headless browser.
JavaScript
11
star
37

template-package

Template package with CI and everything else to get started quickly with creating a new FOSS Meteor package.
JavaScript
10
star
38

meteor-stylus

A fork of meteor:stylus with mquandalle:stylus plugins
JavaScript
8
star
39

meteor-minifiers-autoprefix

JavaScript
6
star
40

meteor-autoform-bs-button-group-input

A Bootstrap button group theme for the "select-checkbox" and "select-radio" AutoForm input types
JavaScript
6
star
41

ground-minimax

Minimax is a thin layer for Meteor providing EJSON.minify and EJSON.maxify
JavaScript
6
star
42

meteor-typescript

Typescript compiler package
TypeScript
5
star
43

meteor-api-untethered

A collection of packages to make Meteor available to other environments.
JavaScript
5
star
44

awesome-meteor

Curated list of awesome Meteor.js things.
5
star
45

Meteor-EventState

DEPRECATED: Evented state
JavaScript
4
star
46

meteor-autoform-themes

Officially supported themes for aldeed:autoform
JavaScript
3
star
47

push

JavaScript
2
star