Skip to content

Commit

Permalink
Change directives to include
Browse files Browse the repository at this point in the history
  • Loading branch information
krollins-mdb committed Jul 5, 2024
1 parent 079bbc1 commit 34e14be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions source/sdk/react-native/manage-users/authenticate-users.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ To log in with an API key:
#. Destructure ``loginWithApiKey`` and ``result`` from the ``useAuth`` hook.
#. Pass your API key to ``loginWithApiKey()``.

.. literalinclude:: /examples/generated/react-native/v12/LoginManager.snippet.api-key-login.tsx.rst
:language: typescript
.. include:: /examples/generated/react-native/v12/LoginManager.snippet.api-key-login.tsx.rst

.. _react-native-custom-jwt-login:
.. _react-native-login-custom-jwt:
Expand Down
15 changes: 5 additions & 10 deletions source/sdk/react-native/manage-users/manage-user-api-keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ You **cannot** create a user API key for a :ref:`server API key
<api-key-authentication-server-api-key>` or an :ref:`anonymous user
<anonymous-authentication>`.

.. literalinclude:: /examples/generated/react-native/v12/Step1.snippet.create-user-api-key.tsx.rst
:language: typescript
.. include:: /examples/generated/react-native/v12/Step1.snippet.create-user-api-key.tsx.rst

.. _react-native-look-up-a-user-api-key:

Expand All @@ -60,8 +59,7 @@ To get an array that lists all of a user's API keys, call
To find a specific API key, pass the key's ``_id`` to
:js-sdk:`ApiKeyAuth.fetch() <classes/Realm.Auth.ApiKeyAuth.html#fetch>`.

.. literalinclude:: /examples/generated/react-native/v12/Step2.snippet.look-up-user-api-key.tsx.rst
:language: javascript
.. include:: /examples/generated/react-native/v12/Step2.snippet.look-up-user-api-key.tsx.rst

.. _react-native-enable-or-disable-a-user-api-key:

Expand All @@ -73,11 +71,9 @@ To enable or disable a user API key, pass the key's ``_id`` to
:js-sdk:`ApiKeyAuth.disable() <classes/Realm.Auth.ApiKeyAuth.html#disable>`. When a key
is disabled, it cannot be used to log in on behalf of the user.

.. literalinclude:: /examples/generated/react-native/v12/Step2.snippet.api-key-enable.tsx.rst
:language: typescript
.. include:: /examples/generated/react-native/v12/Step2.snippet.api-key-enable.tsx.rst

.. literalinclude:: /examples/generated/react-native/v12/Step2.snippet.api-key-disable.tsx.rst
:language: typescript
.. include:: /examples/generated/react-native/v12/Step2.snippet.api-key-disable.tsx.rst

.. _react-native-delete-a-user-api-key:

Expand All @@ -88,5 +84,4 @@ To permanently delete a user API, pass the key's ``_id`` to
:js-sdk:`ApiKeyAuth.delete() <classes/Realm.Auth.ApiKeyAuth.html#delete>`. Deleted keys
cannot be recovered.

.. literalinclude:: /examples/generated/react-native/v12/Step2.snippet.api-key-delete.tsx.rst
:language: typescript
.. include:: /examples/generated/react-native/v12/Step2.snippet.api-key-delete.tsx.rst

0 comments on commit 34e14be

Please sign in to comment.