Users and Accounts

After reading this article, you’ll know: What features in core Meteor enable user accounts How to use accounts-ui for a quick prototype How to use the useraccounts family of packages to build your login UI How to build a fully-featured password login experience How to enable login through OAuth providers like Facebook How to add custom data to Meteor’s users collection How to manage user roles and permissions Features in core Meteor Before we get into all of the different user-facing accounts

Migrating to Meteor 1.3

Breaking changes These are all the breaking changes – that is changes that you absolutely have to worry about if you are updating your app from 1.2.x to 1.3. However, we recommend that you also consider the recommended changes listed in the other sections below. Files in a directory named imports/ will no longer load eagerly. (You should probably rename such a directory as it the basis of our new module system). Files within your app named *.test[s].*, *.app-test[s].*, *.spec[s].* and *.app-

Testing

Introduction Testing allows you to ensure your application works the way you think it does, especially as your codebase changes over time. If you have good tests, you can refactor and rewrite code with confidence. Tests are also the most concrete form of documentation of expected behavior, since other developers can figure out how to use your code by reading the tests. Automated testing is critical because it allows you to run a far greater set of tests much more often than you could manually,

App.configurePlugin

App.configurePlugin(id, config) Set the build-time configuration for a Cordova plugin. Arguments id String The identifier of the plugin you want to configure. config Object A set of key-value pairs which will be passed at build-time to configure the specified plugin.

collection.rawCollection

Server collection.rawCollection() Source Returns the Collection object corresponding to this collection from the npm mongodb driver module which is wrapped by Mongo.Collection.

AccountsClient

Client new AccountsClient(options) import { AccountsClient } from 'meteor/accounts-base' Source Constructor for the Accounts object on the client. Options connection Object Optional DDP connection to reuse. ddpUrl String Optional URL for creating a new DDP connection.

this.unblock

Server this.unblock() Source Call inside a method invocation. Allow subsequent method from this client to begin running in a new fiber.

meteor help

meteor help Get help on meteor command line usage. Running meteor help by itself will list the common meteor commands. Running meteor help command will print detailed help about the command.

this.added

Server this.added(collection, id, fields) Source Call inside the publish function. Informs the subscriber that a document has been added to the record set. Arguments collection String The name of the collection that contains the new document. id String The new document's ID. fields Object The fields in the new document. If _id is present it is ignored.

reactiveVar.get

Client reactiveVar.get() Source Returns the current value of the ReactiveVar, establishing a reactive dependency.