Realm.Auth.ApiKeyAuth

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.

create(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>
delete(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>
disable(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>
enable(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>
fetch(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>
fetchAll()Promise<Array>

Fetches the user API keys associated with the current user.

Returns: Promise<Array>