You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Importing `clerkClient` varies based on your framework. Refer to the [Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties).
2
+
> Importing `clerkClient` varies based on your framework. Refer to the [JS Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties).
Copy file name to clipboardExpand all lines: docs/getting-started/quickstart.js-backend.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ sdk: js-backend
6
6
7
7
[Clerk's JavaScript Backend SDK](/docs/references/backend/overview) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities **for JavaScript environments**.
8
8
9
-
For example, if you wanted to get a list of all users in your application, instead of creating a fetch to [`https://api.clerk.com/v1/users`](/docs/reference/backend-api/tag/users/get/users){{ target: '_blank' }} endpoint, you can use the [`users.getUserList()`](/docs/references/backend/user/get-user-list) method provided by the JavaScript Backend SDK.
9
+
For example, if you wanted to get a list of all users in your application, instead of creating a fetch to [`https://api.clerk.com/v1/users`](/docs/reference/backend-api/tag/users/get/users){{ target: '_blank' }} endpoint, you can use the [`users.getUserList()`](/docs/references/backend/user/get-user-list) method provided by the JS Backend SDK.
10
10
11
11
## Installation
12
12
13
-
<Tabsitems={["Backend SDK", "With other SDKs"]}>
13
+
<Tabsitems={["JS Backend SDK", "With other SDKs"]}>
14
14
<Tab>
15
-
If you are using the JavaScript Backend SDK on its own, you can install it using the following command:
15
+
If you are using the JS Backend SDK on its own, you can install it using the following command:
@@ -34,7 +34,7 @@ For example, if you wanted to get a list of all users in your application, inste
34
34
</Tab>
35
35
36
36
<Tab>
37
-
Clerk SDKs expose an instance of the JavaScript Backend SDK for use in server environments, so there is no need to install it separately.
37
+
Clerk SDKs expose an instance of the JS Backend SDK for use in server environments, so there is no need to install it separately.
38
38
</Tab>
39
39
</Tabs>
40
40
@@ -44,7 +44,7 @@ All resource operations are mounted as sub-APIs on the `clerkClient` object. For
44
44
45
45
To access a resource, you must first instantiate a `clerkClient` instance.
46
46
47
-
<Tabsitems={["Backend SDK", "With other SDKs"]}>
47
+
<Tabsitems={["JS Backend SDK", "With other SDKs"]}>
48
48
<Tab>
49
49
To instantiate a `clerkClient` instance, you must call `createClerkClient()` and pass in [`options`](#create-clerk-client-options).
50
50
@@ -103,7 +103,7 @@ To access a resource, you must first instantiate a `clerkClient` instance.
103
103
104
104
### Instantiate a custom `clerkClient` instance
105
105
106
-
If you would like to customize the behavior of the JavaScript Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options).
106
+
If you would like to customize the behavior of the JS Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options).
@@ -297,9 +297,9 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa
297
297
298
298
<Includesrc="_partials/auth-object-table" />
299
299
300
-
<Tabsitems={["Backend SDK", "With other SDKs"]}>
300
+
<Tabsitems={["JS Backend SDK", "With other SDKs"]}>
301
301
<Tab>
302
-
The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user).
302
+
The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user).
303
303
304
304
```js
305
305
import { createClerkClient } from'@clerk/backend'
@@ -315,7 +315,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa
315
315
returnnull
316
316
}
317
317
318
-
// Use the Backend SDK's `getUser()` method to get the Backend User object
318
+
// Use the JS Backend SDK's `getUser()` method to get the Backend User object
319
319
constuser=awaitclerkClient.users.getUser(userId)
320
320
321
321
// Return the Backend User object
@@ -325,7 +325,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa
325
325
</Tab>
326
326
327
327
<Tab>
328
-
The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user).
328
+
The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user).
329
329
330
330
{/* TODO: The following Tabs example is duplicated in the guides/how-clerk-works/session-tokens.mdx file. It cannot be a partial to be reused across both files because this example includes a partial and partials cannot include partials. Also, the text in each of these tabs is removed in the other file as its not relevant to that file's example. So keep these two Tabs examples in sync please. */}
331
331
@@ -350,7 +350,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa
350
350
351
351
const client =awaitclerkClient()
352
352
353
-
// Use the Backend SDK's `getUser()` method to get the Backend User object
353
+
// Use the JS Backend SDK's `getUser()` method to get the Backend User object
354
354
const user =awaitclient.users.getUser(userId)
355
355
356
356
// Return the Backend User object
@@ -377,7 +377,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa
Copy file name to clipboardExpand all lines: docs/guides/configure/auth-strategies/social-connections/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Use the following tabs to see how to add additional OAuth scopes to the `<UserPr
74
74
75
75
You can use a social provider's OAuth access token to access user data from that provider in addition to their data from Clerk.
76
76
77
-
To retrieve the OAuth access token for a user, use the [`getUserOauthAccessToken()`](/docs/references/backend/user/get-user-oauth-access-token) method from the JavaScript Backend SDK. This method must be used in a server environment, and cannot be run on the client.
77
+
To retrieve the OAuth access token for a user, use the [`getUserOauthAccessToken()`](/docs/references/backend/user/get-user-oauth-access-token) method from the JS Backend SDK. This method must be used in a server environment, and cannot be run on the client.
78
78
79
79
Clerk ensures that the OAuth access token will be always fresh so that you don't have to worry about refresh tokens.
Copy file name to clipboardExpand all lines: docs/guides/development/custom-flows/account-updates/user-impersonation.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This guide will walk you through how to build a custom flow that handles user im
19
19
20
20
Use the following tabs to view the code for:
21
21
22
-
- The main page that gets the list of the application's users using the [JavaScript Backend SDK](/docs/references/backend/user/get-user-list)
22
+
- The main page that gets the list of the application's users using the [JS Backend SDK](/docs/references/backend/user/get-user-list)
23
23
- The Client Component that has the UI for displaying the users and the ability to impersonate them
24
24
- The Server Action that generates the actor token using the [Backend API](/docs/reference/backend-api/tag/actor-tokens/post/actor_tokens){{ target: '_blank' }}
25
25
@@ -38,7 +38,7 @@ This guide will walk you through how to build a custom flow that handles user im
38
38
39
39
const client =awaitclerkClient()
40
40
41
-
// Fetch list of application's users using Clerk's Backend SDK
41
+
// Fetch list of application's users using Clerk's JS Backend SDK
42
42
const users =awaitclient.users.getUserList()
43
43
44
44
// This page needs to be a server component to use clerkClient.users.getUserList()
The [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments.
68
+
The [JS Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments.
69
69
70
-
`clerkClient` exposes an instance of the JavaScript Backend SDK for use in server environments. Use this instance to interact with the Clerk Backend API, as shown in the following example:
70
+
`clerkClient` exposes an instance of the JS Backend SDK for use in server environments. Use this instance to interact with the Clerk Backend API, as shown in the following example:
Copy file name to clipboardExpand all lines: docs/guides/development/migrating/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,4 +87,4 @@ To export your users' data:
87
87
88
88
### Access user data in the backend
89
89
90
-
You can programmatically retrieve a list of your user's and their information by using the [`GetUserList`](/docs/reference/backend-api/tag/Users#operation/GetUserList){{ target: '_blank' }} Backend API endpoint, or the JavaScript Backend SDK's [`getUserList()`](/docs/references/backend/user/get-user-list) method which is a wrapper around the Backend API endpoint.
90
+
You can programmatically retrieve a list of your user's and their information by using the [`GetUserList`](/docs/reference/backend-api/tag/Users#operation/GetUserList){{ target: '_blank' }} Backend API endpoint, or the JS Backend SDK's [`getUserList()`](/docs/references/backend/user/get-user-list) method which is a wrapper around the Backend API endpoint.
0 commit comments