diff --git a/source/sdk/react-native/manage-users/authenticate-users.txt b/source/sdk/react-native/manage-users/authenticate-users.txt index aaec0edc54..cab913eaf0 100644 --- a/source/sdk/react-native/manage-users/authenticate-users.txt +++ b/source/sdk/react-native/manage-users/authenticate-users.txt @@ -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: diff --git a/source/sdk/react-native/manage-users/manage-user-api-keys.txt b/source/sdk/react-native/manage-users/manage-user-api-keys.txt index 9a79211f84..0fbd4c99f2 100644 --- a/source/sdk/react-native/manage-users/manage-user-api-keys.txt +++ b/source/sdk/react-native/manage-users/manage-user-api-keys.txt @@ -46,8 +46,7 @@ You **cannot** create a user API key for a :ref:`server API key ` or an :ref:`anonymous user `. -.. 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: @@ -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() `. -.. 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: @@ -73,11 +71,9 @@ To enable or disable a user API key, pass the key's ``_id`` to :js-sdk:`ApiKeyAuth.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: @@ -88,5 +84,4 @@ To permanently delete a user API, pass the key's ``_id`` to :js-sdk:`ApiKeyAuth.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