Docs Menu

Enable User Metadata

On this page

You can read metadata about your application users from authentication providers, and configure MongoDB Realm to automatically expose each user's data in a field of their user object. For example, you might want to access a user's name or email, their birthday, or their gender.

You can configure MongoDB Realm to request user metadata from the authentication provider and include it in their access token when they log in. You can access the data from the logged-in user's object with your preferred client SDK.

When you configure authentication providers for your application, you can specify optional metadata fields that you want to access through your user's account. These metadata fields vary depending on provider.

Facebook
Google
Custom JWT
  • name
  • first_name
  • last_name
  • picture
  • gender
  • birthday
  • min_age
  • max_age
  • email
  • name
  • first_name
  • last_name
  • picture
  • gender
  • birthday*
  • min_age*
  • max_age*
  • email
  • Custom

Google requires you to enable the Google+ API in your Google app settings to enable metadata fields listed above with *.

When you configure a custom JWT authentication provider for your Realm app, you can specify the metadata fields that your identity provider supports. When you press the Add Field button, you get to define the path, the field name, and whether or not the field is required.

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.