Navigation

User Management

Overview

The MongoDB Stitch admin console provides a basic interface for managing users who have authenticated with your Stitch app.

This interface is available in the Users tab of the Authentication page in the left navigation pane. Available actions include viewing a user’s recent activity, revoking their existing sessions, and deleting them.

Viewing User Activity

MongoDB Stitch logs every function call and request made by users of your Stitch application.

Use the following procedure to view the logs for requests made by a particular user:

  1. Click Authentication in the left navigation pane.
  2. Click on the Users tab.
  3. Find a user in the list and click on the ellipsis ...
  4. Click View activity. You will then be redirected to a log of requests made by that particular user. You can expand an entry to view details for that request, as well as log messages made by any console.log, console.warn, or console.error calls made by functions executed as part of their request.

Revoking User Sessions

Situations may arise where you need to log a particular user out of all of their sessions, and prevent them from making further requests until they reauthenticate. The MongoDB Stitch admin console makes this a straightforward process.

Use the following procedure to revoke all the sessions for a particular user:

  1. Click Authentication in the left navigation pane.
  2. Click on the Users tab.
  3. Find a user in the list and click on the ellipsis ...
  4. Click Revoke all sessions. This invalidates all access tokens and refresh tokens for that user. This means that to perform any further requests in any of their sessions, they will need to reauthenticate.

Deleting a User

Use the following procedure to delete a user from a MongoDB Stitch application:

  1. Click Authentication in the left navigation pane.
  2. Click on the Users tab.
  3. Find a user in the list and click on the ellipsis ...
  4. Click Delete User. This invalidates all access and tokens and refresh tokens for that user, and the user can no longer log in.

Note

Deleting a user will not automatically delete any data in your MongoDB database that you have associated with that user. For example, if you have a todo_items collection with an "owner_id" field, deleting a user will not automatically delete all of their ToDo items. You will need to manually remove those documents from your database if you want to fully remove all traces of that user.

Creating a User

If the Email/Password authentication provider is enabled, you can create new users from within the MongoDB Stitch admin console for testing and debugging purposes.

Use the following procedure to a create a new user:

  1. Click Authentication in the left navigation pane.
  2. Click on the Users tab.
  3. Click + ADD USER.
  4. Specify an email address and password for the new user.
  5. Click Create.