Meteor's accounts packages
Meteor makes it very easy to add authentication to our web app using its accounts
package. The accounts
package is a complete login solution tied to Meteor's core. Created users can be identified by ID in many of Meteor's server-side functions, for example, in a publication:
Meteor.publish("examplePublication", function () { // the current loggedin user id can be accessed via this.userId; }
Additionally, we can add support for login via Facebook, GitHub, Google, Twitter, Meetup, and Weibo by simply adding one or more of the accounts-*
core packages.
Meteor also comes with a simple login interface, an extra template that can be added using the {{> loginButtons}}
helper.
All registered user profiles will be stored in a collection called Users
, which Meteor creates for us. All the processes in authentication and communication use the Secure Remote Password (SRP) protocol and most external services use OAuth.
For our blog, we will simply create one admin user, which...