@clerk/upgrade 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/guide-generators/core-2/backend/__output.mdx +687 -0
  2. package/dist/guide-generators/core-2/chrome-extension/__output.mdx +530 -0
  3. package/dist/guide-generators/core-2/expo/__output.mdx +546 -0
  4. package/dist/guide-generators/core-2/fastify/__output.mdx +448 -0
  5. package/dist/guide-generators/core-2/gatsby/__output.mdx +503 -0
  6. package/dist/guide-generators/core-2/js/__output.mdx +628 -0
  7. package/dist/guide-generators/core-2/nextjs/__output.mdx +1169 -0
  8. package/dist/guide-generators/core-2/node/__output.mdx +592 -0
  9. package/dist/guide-generators/core-2/overview/__output.mdx +33 -0
  10. package/dist/guide-generators/core-2/overview/intro.mdx +1 -1
  11. package/dist/guide-generators/core-2/react/__output.mdx +790 -0
  12. package/dist/guide-generators/core-2/remix/__output.mdx +432 -0
  13. package/dist/guide-generators/core-2/retheme/__output.mdx +440 -0
  14. package/dist/guide-generators/core-2/shared/prepare.mdx +0 -5
  15. package/dist/guide-generators/core-2/shared/update-version.mdx +5 -5
  16. package/dist/versions/core-2/backend/members-count.md +2 -2
  17. package/dist/versions/core-2/index.js +1 -1
  18. package/dist/versions/core-2/nextjs/auth-middleware-deprecated.md +2 -2
  19. package/dist/versions/core-2/nextjs/authmiddleware-import-change.md +1 -1
  20. package/dist/versions/core-2/nextjs/with-clerk-middleware-removed.md +1 -1
  21. package/dist/versions/core-2/node/createclerkexpressrequireauth-public-key-required.md +2 -2
  22. package/dist/versions/core-2/node/createclerkexpresswithauth-publickey-required.md +7 -0
  23. package/package.json +1 -1
  24. /package/dist/versions/core-2/{js/supported-external-accounts-type-removed.md → common/supported-external-accounts-removed.md} +0 -0
@@ -0,0 +1,448 @@
1
+ ---
2
+ title: "Upgrading Fastify to Core 2"
3
+ description: "Learn how to upgrade Clerk's Fastify SDK to the latest version."
4
+ ---
5
+
6
+ {/* WARNING: This is a generated file and should not be edited directly. To update its contents, see the "upgrade" package in the clerk/javascript repo. */}
7
+
8
+ # Upgrading `@clerk/fastify` to Core 2
9
+
10
+ Core 2 is included in the Fastify SDK starting with version 1. This release ships with a variety of smaller DX improvements and housekeeping items. Each of the potentially breaking changes are detailed in this guide, below.
11
+
12
+ By the end of this guide, you’ll have successfully upgraded your Fastify project to use `@clerk/fastify` v5. You’ll learn how to update your dependencies, resolve breaking changes, and find deprecations. Step-by-step instructions will lead you through the process.
13
+
14
+ ## Preparing to upgrade
15
+
16
+ Before uprading, it's highly recommended that you update your Clerk SDKs to the latest Core 1 version (`npm i @clerk/fastify@0`). Some changes required for Core 2 SDKs can be applied incrementally to the v1 release, which should contribute to a smoother upgrading experience. After updating, look out for deprecation messages in your terminal and browser console. By resolving these deprecations you'll be able to skip many breaking changes from Core 2.
17
+
18
+ Additionally, some of the minumum version requirements for some base dependencies have been updated such that versions that are no longer supported or are at end-of-life are no longer guaranteed to work correctly with Clerk.
19
+
20
+ **Updating Node.js**
21
+
22
+ You need to have Node.js `18.17.0` or later installed. Last year, Node.js 16 entered EOL (End of life) status, so support for this version has been removed across Clerk SDKs. You can check your Node.js version by running `node -v` in your terminal. Learn more about how to [update and install Node.js](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
23
+
24
+ ## Updating to Core 2
25
+
26
+ Whenever you feel ready, go ahead and install the latest version of any Clerk SDKs you are using. Make sure that you are prepared to patch some breaking changes before your app will work properly, however. The commands below demonstrate how to install the latest version.
27
+
28
+ <CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
29
+ ```bash filename="terminal"
30
+ npm install @clerk/fastify
31
+ ```
32
+
33
+ ```bash filename="terminal"
34
+ yarn add @clerk/fastify
35
+ ```
36
+
37
+ ```bash filename="terminal"
38
+ pnpm add @clerk/fastify
39
+ ```
40
+
41
+ </CodeBlockTabs>
42
+
43
+ ## CLI upgrade helper
44
+
45
+ Clerk now provides a `@clerk/upgrade` CLI tool that you can use to ease the upgrade process. The tool will scan your codebase and produce a list of changes you'll need to apply to your project. It should catch the vast majority of the changes needed for a successful upgrade to any SDK including Core 2. This can save you a lot of time reading through changes that don't apply to your project.
46
+
47
+ To run the CLI tool, navigate to your project and run it in the terminal:
48
+
49
+ <CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
50
+ ```bash filename="terminal"
51
+ npx @clerk/upgrade
52
+ ```
53
+
54
+ ```bash filename="terminal"
55
+ yarn dlx @clerk/upgrade
56
+ ```
57
+
58
+ ```bash filename="terminal"
59
+ pnpm dlx @clerk/upgrade
60
+ ```
61
+
62
+ </CodeBlockTabs>
63
+
64
+ If you are having trouble with `npx`, it's also possible to install directly with `npm i @clerk/upgrade -g`, and can then be run with the `clerk-upgrade` command.
65
+
66
+ ## Breaking Changes
67
+
68
+ ### Removed: `orgs` claim on JWT
69
+
70
+ In the previous version of Clerk's SDKs, if you decode the session token that Clerk returns from the server, you'll currently find an `orgs` claim on it. It lists all the orgs associated with the given user. Now, Clerk returns the `org_id`, `org_slug`, and `org_role` of the **active** organization.
71
+
72
+ The `orgs` claim was part of the `JwtPayload`. Here are a few examples of where the `JwtPayload` could be found.
73
+
74
+ <Accordion titles={["Next.js", "Fastify", "@clerk/backend", "@clerk/clerk-sdk-node"]} heading="h5">
75
+ <AccordionPanel>
76
+ ```typescript filename="Next.js"
77
+ import { getAuth } from "@clerk/nextjs/server"
78
+ const claims: JwtPayload = getAuth(request).sessionClaims
79
+
80
+ import { getAuth } from "@clerk/ssr.server"
81
+ const claims: JwtPayload = (await getAuth(request)).sessionClaims
82
+ ```
83
+
84
+ </AccordionPanel>
85
+ <AccordionPanel>
86
+ ```typescript filename="Fastify"
87
+ import { getAuth } from "@clerk/fastify"
88
+ const claims: JwtPayload = (await getAuth(request)).sessionClaims
89
+ ```
90
+ </AccordionPanel>
91
+ <AccordionPanel>
92
+ ```typescript filename="@clerk/backend"
93
+ import { createClerkClient } from "@clerk/backend"
94
+
95
+ const clerkClient = createClerkClient({ secretKey: "" })
96
+ const requestState = await clerkClient.authenticateRequest(
97
+ request,
98
+ { publishableKey: "" }
99
+ )
100
+ const claims: JwtPayload = requestState.toAuth().sessionClaims
101
+ ```
102
+
103
+ </AccordionPanel>
104
+ <AccordionPanel>
105
+ ```typescript filename="@clerk/clerk-sdk-node"
106
+ import { clerkClient } from "@clerk/clerk-sdk-node"
107
+
108
+ router.use((...args) => clerkClient.expressRequireAuth()(...args))
109
+ router.get("/me", async (req, reply: Response) => {
110
+ return reply.json({ auth: req.auth })
111
+ })
112
+ ```
113
+
114
+ </AccordionPanel>
115
+ </Accordion>
116
+
117
+ If you would like to have your JWT return all of the user's organizations, you can create a [custom JWT template](/docs/backend-requests/making/jwt-templates) in your dashboard. Add `{ "orgs": "user.organizations" }` to it.
118
+
119
+ ### Image URL Name Consolidation
120
+
121
+ There are a number of Clerk primitives that contain images, and previously they each had different property names, like `avatarUrl`, `logoUrl`, `profileImageUrl`, etc. In order to promote consistency and make it simpler for developers to know where to find associated images, all image properties are now named `imageUrl`. See the list below for all affected classes:
122
+
123
+ <Accordion titles={["<code>Organization.logoUrl</code> -&gt; <code>Organization.imageUrl</code>", "<code>User.profileImageUrl</code> -&gt; <code>.imageUrl</code>", "<code>ExternalAccount.avatarUrl</code> -&gt; <code>.imageUrl</code>", "<code>OrganizationMembershipPublicUserData.profileImageUrl</code> -&gt; <code>.imageUrl</code>"]}>
124
+ <AccordionPanel>
125
+ The `logoUrl` property of any [`Organization` object](https://clerk.com/docs/references/javascript/organization/organization#organization) has been changed to `imageUrl`.
126
+ </AccordionPanel>
127
+ <AccordionPanel>
128
+ The `profileImageUrl` property of any `User` object has been changed to `imageUrl`.
129
+ </AccordionPanel>
130
+ <AccordionPanel>
131
+ The `avatarUrl` property of any [`ExternalAcccount` object](https://clerk.com/docs/references/javascript/external-account) has been changed to `imageUrl`.
132
+ </AccordionPanel>
133
+ <AccordionPanel>
134
+ The `profileImageUrl` property of any `OrganizationMembershipPublicUserData` object has been changed to `imageUrl`.
135
+ </AccordionPanel>
136
+ </Accordion>
137
+
138
+ ### Deprecation removals & housekeeping
139
+
140
+ As part of this major version, a number of previously deprecated props, arugments, methods, etc. have been removed. Additionally there have been some changes to things that are only used internally, or only used very rarely. It's highly unlikely that any given app will encounter any of these items, but they are all breaking changes, so they have all been documented below.
141
+
142
+ <Callout type='info'>
143
+ For this section more than any other one, please use the CLI upgrade tool (`npx @clerk/upgrade`). Changes in this
144
+ section are very unlikely to appear in your codebase, the tool will save time looking for them.
145
+ </Callout>
146
+
147
+ #### Deprecation removals
148
+
149
+ <Accordion titles={["<code>User.update({ password: &#39;x&#39; })</code> -&gt; <code>User.updatePassword(&#39;x&#39;)</code>", "<code>CLERK_API_KEY</code> replaced by <code>CLERK_SECRET_KEY</code>", "<code>CLERK_FRONTEND_API</code> replaced by <code>CLERK_PUBLISHABLE_KEY</code>", "<code>apiKey</code> -&gt; <code>secretKey</code> as param to createClerkClient", "<code>frontendApi</code> -&gt; <code>publishableKey</code> as param to createClerkClient", "<code>frontendApi</code> -&gt; <code>publishableKey</code> as param to clerkPlugin"]}>
150
+ <AccordionPanel>
151
+ If you are updating a user's password via the [`User.update` method](https://clerk.com/docs/references/javascript/user/user#update), it must be changed to [`User.updatePassword`](https://clerk.com/docs/references/javascript/user/password-management#update-password) instead. This method will require the current password as well as the desired new password. We made this update to improve the security of password changes. Example below:
152
+
153
+ ```diff
154
+ - user.update({ password: 'foo' });
155
+
156
+ + user.updatePassword({
157
+ + currentPassword: 'bar',
158
+ + newPassword: 'foo',
159
+ + signOutOfOtherSessions: true,
160
+ + });
161
+ ```
162
+ </AccordionPanel>
163
+ <AccordionPanel>
164
+ The `CLERK_API_KEY` environment variable was renamed to `CLERK_SECRET_KEY`. You can visit your [Clerk dashboard](https://dashboard.clerk.com/last-active?path=api-keys) to copy/paste the new keys after choosing your framework. Make sure to update this in all environments (e.g. dev, staging, production).
165
+ </AccordionPanel>
166
+ <AccordionPanel>
167
+ The `CLERK_FRONTEND_API` environment variable was renamed to `CLERK_PUBLISHABLE_KEY`. You can visit your [Clerk dashboard](https://dashboard.clerk.com/last-active?path=api-keys) to copy/paste the new keys after choosing your framework. Make sure to update this in all environments (e.g. dev, staging, production). **Note:** The values are different, so this is not just a key replacement. [More information](/docs/deployments/overview#api-keys-and-environment-variables).
168
+ </AccordionPanel>
169
+ <AccordionPanel>
170
+ The `apiKey` argument passed to `createClerkClient` must be changed to `secretKey`.
171
+
172
+ ```diff
173
+ import { createClerkClient } from '@clerk/fastify';
174
+
175
+ - createClerkClient({ apiKey: '...' });
176
+ + createClerkClient({ secretKey: '...' });
177
+ ```
178
+ </AccordionPanel>
179
+ <AccordionPanel>
180
+ The `frontendApi` argument passed to `createClerkClient` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
181
+
182
+ ```diff
183
+ import { createClerkClient } from '@clerk/fastify';
184
+
185
+ - createClerkClient({ frontendApi: '...' });
186
+ + createClerkClient({ publishableKey: '...' });
187
+ ```
188
+ </AccordionPanel>
189
+ <AccordionPanel>
190
+ The `frontendApi` argument passed to `clerkPlugin` must be changed to `publishableKey`. Note that the values of the two keys are different, so both keys and values need to be changed. You can find your application's publishable key in the Clerk dashboard.
191
+
192
+ ```diff
193
+ import { clerkPlugin } from '@clerk/fastify';
194
+
195
+ - fastify.register(clerkPlugin, { frontendApi: '...' });
196
+ + fastify.register(clerkPlugin, { publishableKey: '...' });
197
+ ```
198
+ </AccordionPanel>
199
+ </Accordion>
200
+
201
+ #### Other Breaking changes
202
+
203
+ <Accordion titles={["<code>Organization.getRoles</code> arguments changed", "<code>Organization.getMemberships</code> arguments changed", "<code>Organization.getDomains</code> arguments changed", "<code>Organization.getInvitations</code> arguments changed", "<code>Organization.getMembershipRequests</code> arguments changed", "<code>User.getOrganizationInvitations</code> arguments changed", "<code>User.getOrganizationSuggestions</code> arguments changed", "<code>User.getOrganizationMemberships</code> arguments changed", "<code>Users.getOrganizationMembershipList</code> return signature changed", "<code>Users.getOrganizationInvitationList</code> return signature changed", "<code>Organizations.getOrganizationInvitationList</code> return type changed", "<code>User.getOrganizationMembershipList</code> return type changed", "<code>Users.getOrganizationList</code> return signature changed", "<code>Organization.getOrganizationList</code> return type changed", "<code>Invitations.getInvitationList</code> return signature changed", "<code>Sessions.getSessionList</code> return signature changed", "<code>Users.getUserList</code> return signature changed", "<code>AllowlistIdentifiers.getAllowlistIdentifierList</code> return signature changed", "<code>Clients.getClientList</code> return signature changed", "<code>RedirectUrls.getRedirectUrlList</code> return signature changed", "<code>Users.getUserOauthAccessToken</code> return signature changed", "<code>API_URL</code> value has changed", "<code>Clerk</code> -&gt; <code>{ createClerkClient }</code>"]}>
204
+ <AccordionPanel>
205
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
206
+
207
+ ```diff
208
+ const { data } = await organization.getRoles({
209
+ - limit: 10,
210
+ + pageSize: 10,
211
+ - offset: 10,
212
+ + initialPage: 2,
213
+ })
214
+ ```
215
+ </AccordionPanel>
216
+ <AccordionPanel>
217
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
218
+
219
+ ```diff
220
+ const { data } = await organization.getMemberships({
221
+ - limit: 10,
222
+ + pageSize: 10,
223
+ - offset: 10,
224
+ + initialPage: 2,
225
+ })
226
+ ```
227
+ </AccordionPanel>
228
+ <AccordionPanel>
229
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
230
+
231
+ ```diff
232
+ const { data } = await organization.getDomains({
233
+ - limit: 10,
234
+ + pageSize: 10,
235
+ - offset: 10,
236
+ + initialPage: 2,
237
+ })
238
+ ```
239
+ </AccordionPanel>
240
+ <AccordionPanel>
241
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
242
+
243
+ ```diff
244
+ const { data } = await organization.getInvitations({
245
+ - limit: 10,
246
+ + pageSize: 10,
247
+ - offset: 10,
248
+ + initialPage: 2,
249
+ })
250
+ ```
251
+ </AccordionPanel>
252
+ <AccordionPanel>
253
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
254
+
255
+ ```diff
256
+ const { data } = await organization.getMembershipRequests({
257
+ - limit: 10,
258
+ + pageSize: 10,
259
+ - offset: 10,
260
+ + initialPage: 2,
261
+ })
262
+ ```
263
+ </AccordionPanel>
264
+ <AccordionPanel>
265
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
266
+
267
+ ```diff
268
+ const { data } = await user.getOrganizationInvitations({
269
+ - limit: 10,
270
+ + pageSize: 10,
271
+ - offset: 10,
272
+ + initialPage: 2,
273
+ })
274
+ ```
275
+ </AccordionPanel>
276
+ <AccordionPanel>
277
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
278
+
279
+ ```diff
280
+ const { data } = await user.getOrganizationSuggestions({
281
+ - limit: 10,
282
+ + pageSize: 10,
283
+ - offset: 10,
284
+ + initialPage: 2,
285
+ })
286
+ ```
287
+ </AccordionPanel>
288
+ <AccordionPanel>
289
+ There have been a couple changes to the pagination arguments that can be passed into this function - `limit` has been renamed to `pageSize`, and `offset` has been renamed to `initialPage`. This will help to make it more clear and simple to reason about pagination control. Example of how changes might look below:
290
+
291
+ ```diff
292
+ const { data } = await user.getOrganizationMemberships({
293
+ - limit: 10,
294
+ + pageSize: 10,
295
+ - offset: 10,
296
+ + initialPage: 2,
297
+ })
298
+ ```
299
+ </AccordionPanel>
300
+ <AccordionPanel>
301
+ The response payload of `Users.getOrganizationMembershipList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
302
+
303
+ Here's an example of how the response shape would change with this modification:
304
+
305
+ ```diff
306
+ - const data = await clerkClient.users.getOrganizationMembershipList()
307
+ + const { data, totalCount } = await clerkClient.users.getOrganizationMembershipList()
308
+ ```
309
+ </AccordionPanel>
310
+ <AccordionPanel>
311
+ The response payload of `Users.getOrganizationInvitationList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
312
+
313
+ Here's an example of how the response shape would change with this modification:
314
+
315
+ ```diff
316
+ - const data = await clerkClient.users.getOrganizationInvitationList()
317
+ + const { data, totalCount } = await clerkClient.users.getOrganizationInvitationList()
318
+ ```
319
+ </AccordionPanel>
320
+ <AccordionPanel>
321
+ The return type for this function was previously `[Items]` but has now been updated to `{ data: [Items], totalCount: number }`. Since Clerk's API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily. A before/after code example can be seen below:
322
+
323
+ ```diff
324
+ const data = await clerkClient.organizations.getOrganizationInvitationList({
325
+ organizationId: "...",
326
+ })
327
+
328
+ - data.forEach(() => {})
329
+ + data.data.forEach(() => {})
330
+ ```
331
+ </AccordionPanel>
332
+ <AccordionPanel>
333
+ The return type for this function was previously `[Items]` but has now been updated to `{ data: [Items], totalCount: number }`. Since Clerk's API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily. A before/after code example can be seen below:
334
+
335
+ ```diff
336
+ const { user } = useUser()
337
+ const membershipList = user.getOrganizationMembershipList()
338
+
339
+ - membershipList.forEach(() => {})
340
+ + membershipList.data.forEach(() => {})
341
+ ```
342
+ </AccordionPanel>
343
+ <AccordionPanel>
344
+ The response payload of `Users.getOrganizationList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
345
+
346
+ Here's an example of how the response shape would change with this modification:
347
+
348
+ ```diff
349
+ - const data = await clerkClient.users.getOrganizationList()
350
+ + const { data, totalCount } = await clerkClient.users.getOrganizationList()
351
+ ```
352
+ </AccordionPanel>
353
+ <AccordionPanel>
354
+ The return type for this function was previously `[Items]` but has now been updated to `{ data: [Items], totalCount: number }`. Since Clerk's API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily. A before/after code example can be seen below:
355
+
356
+ ```diff
357
+ const { organization } = useOrganization()
358
+ const orgList = organization.getOrganizationList()
359
+
360
+ - orgList.forEach(() => {})
361
+ + orgList.data.forEach(() => {})
362
+ ```
363
+ </AccordionPanel>
364
+ <AccordionPanel>
365
+ The response payload of `Invitations.getInvitationList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
366
+
367
+ Here's an example of how the response shape would change with this modification:
368
+
369
+ ```diff
370
+ - const data = await clerkClient.invitations.getInvitationList()
371
+ + const { data, totalCount } = await clerkClient.invitations.getInvitationList()
372
+ ```
373
+ </AccordionPanel>
374
+ <AccordionPanel>
375
+ The response payload of `Sessions.getSessionList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
376
+
377
+ Here's an example of how the response shape would change with this modification:
378
+
379
+ ```diff
380
+ - const data = await clerkClient.sessions.getSessionList()
381
+ + const { data, totalCount } = await clerkClient.sessions.getSessionList()
382
+ ```
383
+ </AccordionPanel>
384
+ <AccordionPanel>
385
+ The response payload of `Users.getUserList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
386
+
387
+ Here's an example of how the response shape would change with this modification:
388
+
389
+ ```diff
390
+ - const data = await clerkClient.users.getUserList()
391
+ + const { data, totalCount } = await clerkClient.users.getUserList()
392
+ ```
393
+ </AccordionPanel>
394
+ <AccordionPanel>
395
+ The response payload of `AllowlistIdentifiers.getAllowlistIdentifierList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
396
+
397
+ Here's an example of how the response shape would change with this modification:
398
+
399
+ ```diff
400
+ - const data = await clerkClient.allowlistIdentifiers.getAllowlistIdentifierList()
401
+ + const { data, totalCount } = await clerkClient.allowlistIdentifiers.getAllowlistIdentifierList()
402
+ ```
403
+ </AccordionPanel>
404
+ <AccordionPanel>
405
+ The response payload of `Clients.getClientList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
406
+
407
+ Here's an example of how the response shape would change with this modification:
408
+
409
+ ```diff
410
+ - const data = await clerkClient.clients.getClientList()
411
+ + const { data, totalCount } = await clerkClient.allowlistIdentifiers.getClientList()
412
+ ```
413
+ </AccordionPanel>
414
+ <AccordionPanel>
415
+ The response payload of `RedirectUrls.getRedirectUrlList` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
416
+
417
+ Here's an example of how the response shape would change with this modification:
418
+
419
+ ```diff
420
+ - const data = await clerkClient.redirectUrls.getRedirectUrlList()
421
+ + const { data, totalCount } = await clerkClient.redirectUrls.getRedirectUrlList()
422
+ ```
423
+ </AccordionPanel>
424
+ <AccordionPanel>
425
+ The response payload of `Users.getUserOauthAccessToken` was changed as part of the core 2 release. Rather than directly returning ` data`, the return signature is now `{ data, totalCount }`. Since backend API responses are paginated, the `totalCount` property is helpful in determining the total number of items in the response easily, and this change in the backend SDK aligns the response shape with what the backend API returns directly.
426
+
427
+ Here's an example of how the response shape would change with this modification:
428
+
429
+ ```diff
430
+ - const data = await clerkClient.users.getUserOauthAccessToken()
431
+ + const { data, totalCount } = await clerkClient.users.getUserOauthAccessToken()
432
+ ```
433
+ </AccordionPanel>
434
+ <AccordionPanel>
435
+ The value of this export has changed from `https://api.clerk.dev` to `https://api.clerk.com`. If you were relying on the text content of this value not changing, you may need to make adjustments.
436
+ </AccordionPanel>
437
+ <AccordionPanel>
438
+ The `Clerk` default import has changed to `createClerkClient` and been moved to a named import rather than default. You must update your import path in order for it to work correctly. Example below of the fix that needs to be made:
439
+
440
+ ```diff
441
+ - import Clerk from "@clerk/fastify"
442
+ + import { createClerkClient } from "@clerk/fastify"
443
+ ```
444
+ </AccordionPanel>
445
+ </Accordion>
446
+
447
+
448
+