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.
Passwords API
The accounts-password package provides secure password-based authentication. Source:packages/accounts-password/
Client Methods
Meteor.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.
Accounts.changePassword()
Change the current user’s password. Must be logged in. Locus: ClientThe user’s current password. This is not sent in plain text over the wire.
A new password for the user. This is not sent in plain text over the wire.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
Accounts.forgotPassword()
Request a forgot password email. Locus: ClientMust contain
email field.The email address to send a password reset link.
Accounts.resetPassword()
Reset the password for a user using a token received in email. Logs the user in afterwards if the user doesn’t have 2FA enabled. Locus: ClientThe token retrieved from the reset password URL.
A new password for the user. This is not sent in plain text over the wire.
Optional callback. Called with no arguments on success, or with a single Error argument on failure.
Accounts.verifyEmail()
Marks the user’s email address as verified. Logs the user in afterwards if the user doesn’t have 2FA enabled. Locus: ClientThe token retrieved from the verification URL.
Server Methods
Accounts.setPasswordAsync()
Forcibly change the password for a user. Locus: ServerThe id of the user to update.
A new password for the user.
Optional options object.
Logout all current connections with this userId (default: true)
Accounts.sendResetPasswordEmail()
Send an email with a link the user can use to reset their password. Locus: ServerThe id of the user to send email to.
Optional. Which address of the user’s to send the email to. This address must be in the user’s
emails list. Defaults to the first email in the list.Optional additional data to be added into the token record.
Optional additional params to be added to the reset url.
Promise<{email, user, token, url, options}>
Accounts.sendEnrollmentEmail()
Send an email with a link the user can use to set their initial password. Locus: ServerThe id of the user to send email to.
Optional. Which address of the user’s to send the email to.
Accounts.sendVerificationEmail()
Send an email with a link the user can use verify their email address. Locus: ServerThe id of the user to send email to.
Optional. Which address of the user’s to send the email to. This address must be in the user’s
emails list. Defaults to the first unverified email in the list.Email Management (Server)
Accounts.addEmailAsync()
Add an email address for a user. Locus: ServerThe ID of the user to update.
A new email address for the user.
Optional - whether the new email address should be marked as verified. Defaults to false.
Accounts.removeEmail()
Remove an email address for a user. Locus: ServerThe ID of the user to update.
The email address to remove.
Accounts.replaceEmailAsync()
Replace an email address for a user. Locus: ServerThe ID of the user to update.
The email address to replace.
The new email address to use.
Optional - whether the new email address should be marked as verified. Defaults to false.