Search⌘ K
AI Features

The `users` Collection in Meteor

Explore how Meteor manages user data with its built-in users collection. Learn methods to authenticate users on client and server sides, customize user data by adding fields, and publish this data securely to clients. This lesson helps you handle user profiles and authentication for developing robust Meteor applications.

Meteor’s users collection#

Installing the accounts-password package creates a collection in the database called users. This collection is responsible for saving user data. The schema of this collection depends on the accounts package we’re using. Meteor supports different login providers and accounts packages. Remember that the schema determines the shape of the collection. However, we can also use our own custom schema to validate the creation of a new user.

Here’s an example of the data saved when the accounts-password package is used. There’s a profile object in the users collection that we can add additional fields to. We saw an ...