Realm.Auth.APIKeys

A client for the user API key authentication provider which can be used to create and modify user API keys. This client should only be used by an authenticated user.

allAPIKeys()Promise<Array>

Fetches the user API keys associated with the current user.

Returns: Promise<Array>
createAPIKey(name)Promise<void>

Creates a user API key that can be used to authenticate as the current user.

Parameters:
  • name
    • Type: string
    • The name of the API key to be created.

Returns: Promise<void>
deleteAPIKey(id)Promise<void>

Deletes a user API key associated with the current user.

Parameters:
  • id
    • Type: string
    • The id of the API key to delete.

Returns: Promise<void>
disableAPIKey(id)Promise<void>

Disables a user API key associated with the current user.

Parameters:
  • id
    • Type: string
    • The id of the API key to disable.

Returns: Promise<void>
enableAPIKey(id)Promise<void>

Enables a user API key associated with the current user.

Parameters:
  • id
    • Type: string
    • The id of the API key to enable.

Returns: Promise<void>
fetchAPIKey(id)Promise<Object>

Fetches a user API key associated with the current user.

Parameters:
  • id
    • Type: string
    • The id of the API key to fetch.

Returns: Promise<Object>