AccountsCommon#config

Anywhere accountsClientOrServer.config(options) Source Set global accounts options. Options sendVerificationEmail Boolean New users with an email address will receive an address verification email. forbidClientAccountCreation Boolean Calls to createUser from the client will be rejected. In addition, if you are using accounts-ui, the "Create account" link will not be available. restrictCreationByEmailDomain String or Function If set to a string, only allows new users if the do

AccountsCommon#onLogin

Anywhere accountsClientOrServer.onLogin(func) Source Register a callback to be called after a login attempt succeeds. Arguments func Function The callback to be called when login is successful.

AccountsClient#logout

Client accountsClient.logout([callback]) Source Log the user out. Arguments callback Function Optional callback. Called with no arguments on success, or with a single Error argument on failure.

AccountsClient#loggingIn

Client accountsClient.loggingIn() Source True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress. A reactive data source.

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.

Accounts.verifyEmail

Client Accounts.verifyEmail(token, [callback]) import { Accounts } from 'meteor/accounts-base' Source Marks the user's email address as verified. Logs the user in afterwards. Arguments token String The token retrieved from the verification URL. callback Function Optional callback. Called with no arguments on success, or with a single Error argument on failure.

Accounts.ui.config

Client Accounts.ui.config(options) import { Accounts } from 'meteor/accounts-base' Source Configure the behavior of {{> loginButtons}}. Options requestPermissions Object Which permissions to request from the user for each external service. requestOfflineToken Object To ask the user for permission to act on their behalf when offline, map the relevant external service to true. Currently only supported with Google. See Meteor.loginWithExternalService for more details. forceAppr

Accounts.setUsername

Server Accounts.setUsername(userId, newUsername) import { Accounts } from 'meteor/accounts-base' Source Change a user's username. Use this instead of updating the database directly. The operation will fail if there is an existing user with a username only differing in case. Arguments userId String The ID of the user to update. newUsername String A new username for the user.

Accounts.sendVerificationEmail

Server Accounts.sendVerificationEmail(userId, [email]) import { Accounts } from 'meteor/accounts-base' Source Send an email with a link the user can use verify their email address. Arguments userId String The id of the user to send email to. email String 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.

Accounts.setPassword

Server Accounts.setPassword(userId, newPassword, [options]) import { Accounts } from 'meteor/accounts-base' Source Forcibly change the password for a user. Arguments userId String The id of the user to update. newPassword String A new password for the user. Options logout Object Logout all current connections with this userId (default: true)