Documentation Index
Fetch the complete documentation index at: https://mintlify.com/meteor/meteor/llms.txt
Use this file to discover all available pages before exploring further.
Meteor Namespace API
TheMeteor namespace provides the core API for Meteor applications on both client and server.
User Management
Meteor.userId()
Get the current user id, ornull if no user is logged in. A reactive data source.
Locus: Anywhere
Meteor.user()
Get the current user record, ornull if no user is logged in. A reactive data source.
Locus: Anywhere
Optional options object.
Dictionary of fields to return or exclude.
Meteor.user() is deprecated. Use Meteor.userAsync() instead.
Meteor.userAsync()
Asynchronously get the current user record, ornull if no user is logged in.
Locus: Anywhere
Optional options object.
Dictionary of fields to return or exclude.
Authentication
Meteor.logout()
Log the user out. Locus: ClientOptional callback. Called with no arguments on success, or with a single Error argument on failure.
Meteor.logoutAllClients()
Log out all clients logged in as the current user and logs the current user out as well. Locus: ClientMeteor.logoutOtherClients()
Log out other clients logged in as the current user, but does not log out the client that calls this function. Locus: ClientMeteor.loginWithPassword()
Log the user in with a password. Locus: ClientEither a string interpreted as a username or an email; or an object with a single key:
email, username or id. Username or email match in a case insensitive manner.The user’s password.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
Meteor.loginWithToken()
Login with a Meteor access token. Locus: ClientLocal storage token for use with login across multiple tabs in the same browser.
Optional callback. Called with no arguments on success.
Connection Management
Meteor.status()
Get the current connection status. A reactive data source. Locus: ClientTrue if currently connected to the server.
Connection status: “connected”, “connecting”, “failed”, “waiting”, or “offline”.
Number of reconnection attempts made.
Estimated time of next reconnection attempt.
If failed, description of why.
Meteor.reconnect()
Force an immediate reconnection attempt if the client is not connected to the server. Locus: ClientMeteor.disconnect()
Disconnect the client from the server. Locus: ClientReactive State
Meteor.loggingIn()
True if a login method is currently in progress. A reactive data source. Locus: ClientMeteor.loggingOut()
True if a logout method is currently in progress. A reactive data source. Locus: ClientServer Connection
Meteor.onConnection()
Register a callback to be called when a new DDP connection is made to the server. Locus: ServerThe function to call when a new DDP connection is established.