@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,440 @@
1
+ ---
2
+ title: "Redesigned Components in Core 2"
3
+ description: "Learn how to handle changes as a result of redesigned components in Clerk Core 2"
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
+ # Redesigned Components in Core 2
9
+
10
+ The new version ships with improved design and UX across all of Clerk's [UI components](/docs/components/overview). If you have used the [`appearance` prop](/docs/components/customization/overview) or tokens for a [custom theme](/docs/components/customization/overview#create-a-custom-theme), you will likely need to make some adjustments to ensure your styling is still looking great. If you're using the [localization prop](/docs/components/customization/localization) you will likely need to make adjustments to account for added or removed localization keys.
11
+
12
+ <Callout type='info'>
13
+ If you are not customizing the appearance of your components, or using `localization`, you can skip this section. If
14
+ you are, we recommend using our CLI (`npx @clerk/upgrade`) to scan for changes required as part of the component
15
+ redesign more quickly.
16
+ </Callout>
17
+
18
+ The sections below contain more info on each change made to the customization ids and localization keys for reference. Regardless of how thoroughly you have reviewed the following information, we still recommend that you ensure that you have taken some time to manually look through each of your views to ensure that everything looks good still.
19
+
20
+ Also worth noting - if you are using Clerk's account portal (hosted sign in page), and would like to enable the new design there, you can do so via the "customization" tab on the [account portal page](https://dashboard.clerk.com/last-active?path=account-portal) in your dashboard. Selecting "Core 2" from the "ClerkJS Components" dropdown will enable the new designs.
21
+
22
+ ## Appearance Changes
23
+
24
+ <Accordion titles={["Within <code>&lt;UserProfile /&gt;</code>, Multi-Factor Auth is Added via Dropdown", "Breaking Changes to appearance variables", "<code>Settings</code> -&gt; <code>General</code> tab in <code>OrganizationProfile</code>", "Within <code>&lt;UserProfile /&gt;</code>, Account and Security Pages Separated", "Within <code>&lt;UserProfile /&gt;</code>, Connected Accounts Added via Dropdown", "<code>userButtonPopoverActionButtonText</code> customization id removed", "<code>userButtonBox</code> is now a child of <code>userButtonTrigger</code>", "<code>organizationSwitcherPopoverActionButtonText</code> customization id removed", "Changes to the <code>card</code> customization id", "Back button customization ids change on alternative 2fa methods page", "<code>button</code> -&gt; <code>organizationListCreateOrganizationActionButton</code> customization id", "<code>socialButtonsBlockButtonArrow</code> customization id removed", "Identity preview avatar customization ids removed", "Changes to default variables"]}>
25
+ <AccordionPanel>
26
+ Within the `<UserProfile />` component (which is also rendered by `<UserButton />`), adding a multi-factor auth (MFA) method is now rendered as a dropdown instead of a modal. If you were relying on the modal for any sort of customizations, these customizations will need to be adjusted to the new form factor.
27
+
28
+ Two new appearance prop keys were added to aid with this process: `cl-menuList__mfa` for styling the list of MFA factors, and `cl-menuItem__mfa` for styling individual items.
29
+ </AccordionPanel>
30
+ <AccordionPanel>
31
+ Several appearance variables have been removed or renamed. If you were using these variables in your application, you will need to update your code to use the new variables.
32
+
33
+ - The `fontSmoothing` variable has been removed.
34
+ - The `shadowShimmer` variable has been removed.
35
+ - The `colorAlphaShade` variable has been renamed to `colorNeutral`.
36
+ </AccordionPanel>
37
+ <AccordionPanel>
38
+ The "Settings" tab within the `<OrganizationProfile />` component has been renamed to "General". If you are linking directly to `/organization-settings` from anywhere, the link will need to be updated to `/organization-general`.
39
+
40
+ If you are [customizing the component](https://clerk.com/docs/components/customization/organization-profile) by re-ordering the pages, the label used to target this page must be changed from `settings` to `general` as well.
41
+
42
+ If you are using the [appearance prop](https://clerk.com/docs/components/customization/overview) to customize the appearance of the `<OrganizationProfile />` component, please note that the `cl-profilePage__organizationSettings` key has also been changed to `cl-profilePage__organizationGeneral` to be consistent with the naming change.
43
+ </AccordionPanel>
44
+ <AccordionPanel>
45
+ Within the `<UserProfile />` component (which is also rendered by `<UserButton />`), the "Account" and "Security" pages now live within their own tabs. Previously, "Security" was a section within the "Account" tab. The "Security" page can now be directly linked to under the `/security` path if desired.
46
+ </AccordionPanel>
47
+ <AccordionPanel>
48
+ Within the `<UserProfile />` component (which is also rendered by `<UserButton />`), adding a connected account is now rendered as a dropdown instead of a modal. If you were relying on the modal for any sort of customizations, these customizations will need to be adjusted to the new form factor.
49
+
50
+ New appearance prop keys were added to aid with customization, if desired:
51
+
52
+ - `cl-menuList__connectedAccounts` for styling the list of connected account addition options
53
+ - `cl-menuItem__connectedAccounts` for styling individual items in the connected account options list
54
+ - `cl-menuList__web3Wallets` for styling the list of web3 wallet addition options
55
+ - `cl-menuItem__web3Wallets` for styling individual items in the web3 wallets options list
56
+ </AccordionPanel>
57
+ <AccordionPanel>
58
+ The `userButtonPopoverActionButtonText` customization id has been removed, as the text for this button is now directly rendered inside the button rather than an extra wrapping element. The nested ids `userButtonPopoverActionButtonText__signOut` and `userButtonPopoverActionButtonText__manageAccount` have also been removed. Any styling that needs to apply to the text can be applied to its direct parent `cl-userButtonPopoverActionButton`.
59
+ </AccordionPanel>
60
+ <AccordionPanel>
61
+ The parent-child relationship of the two elements `userButtonTrigger` and `userButtonBox` has been swapped. Previously, `userButtonTrigger` was nested inside of `userButtonBox`, and now `userButtonBox` is nested inside of `userButtonTrigger`. This change resolves [some usability issues](https://github.com/clerk/javascript/issues/1625) in `<UserButton />`. If you are applying style customization to either of these elements, your customizations may need to be adjusted.
62
+ </AccordionPanel>
63
+ <AccordionPanel>
64
+ The `organizationSwitcherPopoverActionButtonText` customization id has been removed, as the text for this button is now directly rendered inside the button rather than an extra wrapping element. The nested ids `organizationSwitcherPopoverActionButtonText__manageOrganization` and `organizationSwitcherPopoverActionButtonText__createOrganization` have also been removed. Any styling that needs to apply to the text can be applied to its direct parent `cl-organizationSwitcherPopoverActionButton`.
65
+ </AccordionPanel>
66
+ <AccordionPanel>
67
+ The `card` customization id in the previous major version was the main and only container element for components. Outside the `card` element, a new `cardBox` id was introduced that allows more fine-grained style customization.
68
+
69
+ As a note, if you are changing the background color of `card`, you will also need to also apply the same color on the `footer` id as well. The `footer` now gray by default, and it’s located outside `card`, but inside `cardBox`.
70
+
71
+ A `footerItem` id was also added for more targeted styling of items inside the `footer`.
72
+ </AccordionPanel>
73
+ <AccordionPanel>
74
+ The "back" button on the panel within `<SignIn />` that lists out alternative two factor auth methods has changed location, and there have been some changes to the ids as a result of this:
75
+
76
+ - `headerBackIcon` has been removed, as there is no longer an associated icon
77
+ - `headerBackRow` has been renamed to `backRow` as it's no longer in the header
78
+ - `headerBackLink` has been renamed to `backLink` as it's no longer in the header
79
+ </AccordionPanel>
80
+ <AccordionPanel>
81
+ The `button` customization id was used only in one place, for a button to create a new organization in the `<OrganizationList />` component. This id has been removed and replaced by the more appropriately named `organizationListCreateOrganizationActionButton` customization id instead.
82
+ </AccordionPanel>
83
+ <AccordionPanel>
84
+ Social sign-in buttons in the new component designs no longer include arrows, so the `socialButtonsBlockButtonArrow` customization id has been removed. You can use the `socialButtonsIconButton` to apply custom styling to the social buttons if desired.
85
+ </AccordionPanel>
86
+ <AccordionPanel>
87
+ When signing in with Clerk's `<SignIn />` component, after entering a username or email the user is brought to a second pane where they can enter a second factor such as a password. On this pane, there is an area called "identity preview" that shows the username/email that they are entering a password/etc for. Previously, this area included the user's avatar, but this is no longer the case in updated designs. As such, the customization ids related to the user's avatar have been removed.
88
+ </AccordionPanel>
89
+ <AccordionPanel>
90
+ The default values of some [appearance variables](/docs/components/customization/variables) have changed which may impact your UI (if you are not already overriding them).
91
+
92
+ - The default `colorPrimary` value changed from `#103FEF` to `#2F3037`. As the new color is a dark grey, the `colorPrimary` of the dark theme was changed to `#FFFFFF`.
93
+ - The default `fontSize` value changed from `1rem` to `0.8125rem`
94
+ - The default `fontWeight` values changed from `{ normal: 400, medium: 500, bold: 600 }` to `{ normal: 400, medium: 500, semibold: 600, bold: 700 }`.
95
+ </AccordionPanel>
96
+ </Accordion>
97
+
98
+ ## Localization Changes
99
+
100
+ <Accordion titles={["New localization keys added", "Removed localization keys", "Localization keys changed"]}>
101
+ <AccordionPanel>
102
+ As part of the redesign of Clerk's components, a number of new localization keys have been added and can be seen along with their default english values in the code block below. If you do not supply translated values for these keys in your custom localization, they will fall back to the default english values specified below.
103
+
104
+ ```js
105
+ const newValues = {
106
+ formButtonPrimary__verify: 'Verify',
107
+ formFieldInputPlaceholder__confirmDeletionUserAccount: 'Delete account',
108
+ organizationProfile: {
109
+ invitePage: {
110
+ selectDropdown__role: 'Select role',
111
+ },
112
+ navbar: {
113
+ description: 'Manage your organization.',
114
+ general: 'General',
115
+ members: 'Members',
116
+ title: 'Organization',
117
+ },
118
+ profilePage: {
119
+ domainSection: {
120
+ menuAction__manage: 'Manage',
121
+ menuAction__remove: 'Delete',
122
+ menuAction__verify: 'Verify',
123
+ },
124
+ },
125
+ start: {
126
+ headerTitle__general: 'General',
127
+ profileSection: {
128
+ primaryButton: 'Update profile',
129
+ title: 'Organization Profile',
130
+ uploadAction__title: 'Logo',
131
+ },
132
+ },
133
+ verifiedDomainPage: {
134
+ title: 'Update {{domain}}',
135
+ },
136
+ },
137
+ signIn: {
138
+ accountSwitcher: {
139
+ action__addAccount: 'Add account',
140
+ action__signOutAll: 'Sign out of all accounts',
141
+ subtitle: 'Select the account with which you wish to continue.',
142
+ title: 'Choose an account',
143
+ },
144
+ alternativeMethods: {
145
+ actionText: 'Don’t have any of these?',
146
+ subtitle: 'Facing issues? You can use any of these methods to sign in.',
147
+ },
148
+ forgotPassword: {
149
+ subtitle_email: 'First, enter the code sent to your email ID',
150
+ subtitle_phone: 'First, enter the code sent to your phone',
151
+ title: 'Reset password',
152
+ },
153
+ },
154
+ unstable__errors: {
155
+ form_param_format_invalid__phone_number: 'Phone number must be in a valid international format',
156
+ },
157
+ userProfile: {
158
+ emailAddressPage: {
159
+ verifyTitle: 'Verify email address',
160
+ },
161
+ formButtonPrimary__add: 'Add',
162
+ formButtonPrimary__remove: 'Remove',
163
+ formButtonPrimary__save: 'Save',
164
+ mfaPhoneCodePage: {
165
+ backButton: 'Use existing number',
166
+ successMessage1:
167
+ 'When signing in, you will need to enter a verification code sent to this phone number as an additional step.',
168
+ successMessage2:
169
+ 'Save these backup codes and store them somewhere safe. If you lose access to your authentication device, you can use backup codes to sign in.',
170
+ successTitle: 'SMS code verification enabled',
171
+ },
172
+ navbar: {
173
+ account: 'Profile',
174
+ description: 'Manage your account info.',
175
+ security: 'Security',
176
+ title: 'Account',
177
+ },
178
+ passwordPage: {
179
+ checkboxInfoText__signOutOfOtherSessions:
180
+ 'It is recommended to sign out of all other devices which may have used your old password.',
181
+ successMessage__set: 'Your password has been set.',
182
+ successMessage__signOutOfOtherSessions: 'All other devices have been signed out.',
183
+ successMessage__update: 'Your password has been updated.',
184
+ title__set: 'Set password',
185
+ title__update: 'Update password',
186
+ },
187
+ phoneNumberPage: {
188
+ verifySubtitle: 'Enter the verification code sent to {{identifier}}',
189
+ verifyTitle: 'Verify phone number',
190
+ },
191
+ start: {
192
+ passwordSection: {
193
+ primaryButton__updatePassword: 'Update password',
194
+ },
195
+ profileSection: {
196
+ primaryButton: 'Update profile',
197
+ },
198
+ usernameSection: {
199
+ primaryButton__updateUsername: 'Update username',
200
+ },
201
+ },
202
+ usernamePage: {
203
+ title__set: 'Set username',
204
+ title__update: 'Update username',
205
+ },
206
+ },
207
+ };
208
+ ```
209
+ </AccordionPanel>
210
+ <AccordionPanel>
211
+ As part of the redesign of Clerk's components, a number of localization keys have been removed as they were no longer present in the new designs. You should remove any of these keys that are present in your localization object as they are no longer needed.
212
+
213
+ ```js
214
+ const deletedKeys = [
215
+ 'formFieldLabel__emailAddress_phoneNumber',
216
+ 'formFieldLabel__phoneNumber_username',
217
+ 'formFieldLabel__emailAddress_phoneNumber_username',
218
+ 'formFieldInputPlaceholder__emailAddress_phoneNumber',
219
+ 'formFieldInputPlaceholder__phoneNumber_username',
220
+ 'formFieldInputPlaceholder__emailAddress_phoneNumber_username',
221
+ 'signIn.forgotPassword.title_email',
222
+ 'signIn.forgotPassword.title_phone',
223
+ 'signIn.forgotPassword.formSubtitle_email',
224
+ 'signIn.forgotPassword.formSubtitle_phone',
225
+ 'signIn.emailCode.formSubtitle',
226
+ 'signIn.phoneCode.formSubtitle',
227
+ 'signIn.phoneCodeMfa.formSubtitle',
228
+ 'signIn.totpMfa.formSubtitle',
229
+ 'signIn.backupCodeMfa.formTitle',
230
+ 'signIn.backupCodeMfa.formSubtitle',
231
+ 'userProfile.start.headerSubtitle__account',
232
+ 'userProfile.start.headerSubtitle__security',
233
+ 'userProfile.start.usernameSection.primaryButton__changeUsername',
234
+ 'userProfile.start.emailAddressesSection.detailsTitle__primary',
235
+ 'userProfile.start.emailAddressesSection.detailsSubtitle__primary',
236
+ 'userProfile.start.emailAddressesSection.detailsTitle__nonPrimary',
237
+ 'userProfile.start.emailAddressesSection.detailsSubtitle__nonPrimary',
238
+ 'userProfile.start.emailAddressesSection.detailsTitle__unverified',
239
+ 'userProfile.start.emailAddressesSection.detailsSubtitle__unverified',
240
+ 'userProfile.start.emailAddressesSection.destructiveActionTitle',
241
+ 'userProfile.start.emailAddressesSection.destructiveActionSubtitle',
242
+ 'userProfile.start.phoneNumbersSection.detailsTitle__primary',
243
+ 'userProfile.start.phoneNumbersSection.detailsSubtitle__primary',
244
+ 'userProfile.start.phoneNumbersSection.detailsTitle__nonPrimary',
245
+ 'userProfile.start.phoneNumbersSection.detailsSubtitle__nonPrimary',
246
+ 'userProfile.start.phoneNumbersSection.detailsTitle__unverified',
247
+ 'userProfile.start.phoneNumbersSection.detailsSubtitle__unverified',
248
+ 'userProfile.start.phoneNumbersSection.destructiveActionTitle',
249
+ 'userProfile.start.phoneNumbersSection.destructiveActionSubtitle',
250
+ 'userProfile.start.connectedAccountsSection.title__conectionFailed',
251
+ 'userProfile.start.connectedAccountsSection.title__connectionFailed',
252
+ 'userProfile.start.connectedAccountsSection.title__reauthorize',
253
+ 'userProfile.start.connectedAccountsSection.actionLabel__conectionFailed',
254
+ 'userProfile.start.connectedAccountsSection.destructiveActionSubtitle',
255
+ 'userProfile.start.connectedAccountsSection.destructiveActionAccordionSubtitle',
256
+ 'userProfile.start.passwordSection.primaryButton__changePassword',
257
+ 'userProfile.start.mfaSection.phoneCode.destructiveActionTitle',
258
+ 'userProfile.start.mfaSection.phoneCode.destructiveActionSubtitle',
259
+ 'userProfile.start.mfaSection.phoneCode.title__default',
260
+ 'userProfile.start.mfaSection.phoneCode.title__setDefault',
261
+ 'userProfile.start.mfaSection.phoneCode.subtitle__default',
262
+ 'userProfile.start.mfaSection.phoneCode.subtitle__setDefault',
263
+ 'userProfile.start.mfaSection.totp.title',
264
+ 'userProfile.start.mfaSection.totp.subtitle',
265
+ 'userProfile.start.mfaSection.totp.destructiveActionSubtitle',
266
+ 'userProfile.start.mfaSection.totp.destructiveActionLabel',
267
+ 'userProfile.start.activeDevicesSection.primaryButton',
268
+ 'userProfile.start.activeDevicesSection.detailsTitle',
269
+ 'userProfile.start.activeDevicesSection.detailsSubtitle',
270
+ 'userProfile.start.activeDevicesSection.destructiveActionTitle',
271
+ 'userProfile.start.activeDevicesSection.destructiveActionSubtitle',
272
+ 'userProfile.start.web3WalletsSection.destructiveActionTitle',
273
+ 'userProfile.start.web3WalletsSection.destructiveActionSubtitle',
274
+ 'userProfile.start.dangerSection.deleteAccountTitle',
275
+ 'userProfile.start.dangerSection.deleteAccountDescription',
276
+ 'userProfile.profilePage.fileDropAreaTitle',
277
+ 'userProfile.profilePage.fileDropAreaAction',
278
+ 'userProfile.usernamePage.title',
279
+ 'userProfile.phoneNumberPage.infoText__secondary',
280
+ 'userProfile.passwordPage.title',
281
+ 'userProfile.passwordPage.changePasswordTitle',
282
+ 'userProfile.passwordPage.successMessage',
283
+ 'userProfile.passwordPage.changePasswordSuccessMessage',
284
+ 'userProfile.passwordPage.sessionsSignedOutSuccessMessage',
285
+ 'userProfile.mfaPhoneCodePage.successMessage',
286
+ 'organizationProfile.start.headerTitle__settings',
287
+ 'organizationProfile.start.headerSubtitle__members',
288
+ 'organizationProfile.start.headerSubtitle__settings',
289
+ 'organizationProfile.profilePage.subtitle',
290
+ 'organizationProfile.profilePage.domainSection.unverifiedDomain_menuAction__verify',
291
+ 'organizationProfile.profilePage.domainSection.unverifiedDomain_menuAction__remove',
292
+ 'organizationProfile.verifiedDomainPage.enrollmentTab.formButton__save',
293
+ 'organizationProfile.membersPage.start.headerTitle__active',
294
+ 'organizationProfile.membersPage.start.headerTitle__invited',
295
+ 'organizationProfile.membersPage.invitationsTab.manualInvitations.headerTitle',
296
+ 'organizationProfile.membersPage.invitationsTab.manualInvitations.headerSubtitle',
297
+ 'organizationProfile.membersPage.requestsTab.requests.headerTitle',
298
+ 'organizationProfile.membersPage.requestsTab.requests.headerSubtitle',
299
+ 'createOrganization.subtitle',
300
+ ];
301
+ ```
302
+
303
+ If you'd like to automate this, you can use the [lodash omit function](https://lodash.com/docs/#omit) as such:
304
+
305
+ ```js
306
+ import { omit } from 'lodash-es';
307
+
308
+ const localization = omit(yourOldOject, deletedKeys);
309
+ ```
310
+ </AccordionPanel>
311
+ <AccordionPanel>
312
+ The values of some keys have been changed on the default [en-US localization object](https://github.com/clerk/javascript/blob/main/packages/localizations/src/en-US.ts). The list below shows you the new defaults (as of writing this guide) which you can either use or overwrite. If you have overridden these values, make sure to double check so you can be sure that your modifications are appropriate.
313
+
314
+ ```js
315
+ const changedValues = {
316
+ formFieldLabel__organizationName: 'Name',
317
+ formFieldLabel__organizationSlug: 'Slug',
318
+ formFieldInputPlaceholder__emailAddresses: 'example@email.com, example2@email.com',
319
+ formFieldInputPlaceholder__organizationSlug: 'my-org',
320
+ signUp: {
321
+ start: {
322
+ subtitle: 'Welcome! Please fill in the details to get started.',
323
+ actionText: 'Already have an account?',
324
+ },
325
+ emailCode: {
326
+ subtitle: 'Enter the verification code sent to your email',
327
+ },
328
+ phoneCode: {
329
+ subtitle: 'Enter the verification code sent to your phone',
330
+ },
331
+ continue: {
332
+ subtitle: 'Please fill in the remaining details to continue.',
333
+ actionText: 'Already have an account?',
334
+ },
335
+ },
336
+ signIn: {
337
+ start: {
338
+ title: 'Sign in to {{applicationName}}',
339
+ subtitle: 'Welcome back! Please sign in to continue',
340
+ actionText: 'Don’t have an account?',
341
+ },
342
+ password: {
343
+ subtitle: 'Enter the password associated with your account',
344
+ },
345
+ forgotPasswordAlternativeMethods: {
346
+ label__alternativeMethods: 'Or, sign in with another method',
347
+ },
348
+ resetPassword: {
349
+ title: 'Set new password',
350
+ },
351
+ phoneCodeMfa: {
352
+ subtitle: 'To continue, please enter the verification code sent to your phone',
353
+ },
354
+ totpMfa: {
355
+ subtitle: 'To continue, please enter the verification code generated by your authenticator app',
356
+ },
357
+ backupCodeMfa: {
358
+ subtitle: 'Your backup code is the one you got when setting up two-step authentication.',
359
+ },
360
+ },
361
+ userProfile: {
362
+ start: {
363
+ headerTitle__account: 'Profile details',
364
+ emailAddressesSection: {
365
+ primaryButton: 'Add email address',
366
+ detailsAction__unverified: 'Verify',
367
+ destructiveAction: 'Remove email',
368
+ },
369
+ phoneNumbersSection: {
370
+ primaryButton: 'Add phone number',
371
+ },
372
+ mfaSection: {
373
+ phoneCode: {
374
+ destructiveActionLabel: 'Remove',
375
+ },
376
+ backupCodes: {
377
+ actionLabel__regenerate: 'Regenerate',
378
+ },
379
+ },
380
+ dangerSection: {
381
+ title: 'Delete account',
382
+ deleteAccountButton: 'Delete account',
383
+ },
384
+ },
385
+ profilePage: {
386
+ imageFormSubtitle: 'Upload',
387
+ imageFormDestructiveActionSubtitle: 'Remove',
388
+ fileDropAreaHint: 'Recommended size 1:1, up to 10MB.',
389
+ },
390
+ phoneNumberPage: {
391
+ infoText:
392
+ 'A text message containing a verification code will be sent to this phone number. Message and data rates may apply.',
393
+ },
394
+ connectedAccountPage: {
395
+ socialButtonsBlockButton: '{{provider|titleize}}',
396
+ },
397
+ mfaPhoneCodePage: {
398
+ primaryButton__addPhoneNumber: 'Add phone number',
399
+ subtitle__availablePhoneNumbers:
400
+ 'Select an existing phone number to register for SMS code two-step verification or add a new one.',
401
+ subtitle__unavailablePhoneNumbers:
402
+ 'There are no available phone numbers to register for SMS code two-step verification, please add a new one.',
403
+ },
404
+ deletePage: {
405
+ actionDescription: "Type 'Delete account' below to continue.",
406
+ },
407
+ },
408
+ organizationSwitcher: {
409
+ action__createOrganization: 'Create organization',
410
+ action__manageOrganization: 'Manage',
411
+ },
412
+ organizationProfile: {
413
+ profilePage: {
414
+ title: 'Update profile',
415
+ dangerSection: {
416
+ leaveOrganization: {
417
+ actionDescription: "Type '{{organizationName}}' below to continue.",
418
+ },
419
+ deleteOrganization: {
420
+ actionDescription: "Type '{{organizationName}}' below to continue.",
421
+ },
422
+ },
423
+ },
424
+ invitePage: {
425
+ title: 'Invite new members',
426
+ subtitle: 'Enter or paste one or more email addresses, separated by spaces or commas.',
427
+ },
428
+ },
429
+ createOrganization: {
430
+ title: 'Create organization',
431
+ },
432
+ organizationList: {
433
+ title: 'Choose an account',
434
+ titleWithoutPersonal: 'Choose an organization',
435
+ },
436
+ };
437
+ ```
438
+ </AccordionPanel>
439
+ </Accordion>
440
+
@@ -2,9 +2,4 @@
2
2
 
3
3
  Before uprading, it's highly recommended that you update your Clerk SDKs to the latest Core 1 version (`npm i <%= packageName %>@<%= parseInt(version.substring(1)) - 1 %>`). Some changes required for Core 2 SDKs can be applied incrementally to the <%= version %> 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.
4
4
 
5
- <Callout>
6
- Note that Core 2 is currently in beta, while we field feedback and ensure stability. Deploying beta versions to
7
- production is not recommended and should be done at your own risk.
8
- </Callout>
9
-
10
5
  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.
@@ -1,18 +1,18 @@
1
- ## Updating to Core 2 Beta
1
+ ## Updating to Core 2
2
2
 
3
- Whenever you feel ready, go ahead and install the latest beta 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 beta.
3
+ 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.
4
4
 
5
5
  <CodeBlockTabs type="installer" options={["npm", "yarn", "pnpm"]}>
6
6
  ```bash filename="terminal"
7
- npm install <%= packageName %>@beta
7
+ npm install <%= packageName %>
8
8
  ```
9
9
 
10
10
  ```bash filename="terminal"
11
- yarn add <%= packageName %>@beta
11
+ yarn add <%= packageName %>
12
12
  ```
13
13
 
14
14
  ```bash filename="terminal"
15
- pnpm add <%= packageName %>@beta
15
+ pnpm add <%= packageName %>
16
16
  ```
17
17
 
18
18
  </CodeBlockTabs>
@@ -1,6 +1,6 @@
1
1
  ---
2
- title: "`Organization.members_count` -> `Organization.membersCount`"
3
- matcher: "\.members_count"
2
+ title: '`Organization.members_count` -> `Organization.membersCount`'
3
+ matcher: "\\.members_count"
4
4
  ---
5
5
 
6
6
  The `members_count` attribute of the `Organization` resource has been renamed to `membersCount` to match the naming convention of other attributes.
@@ -4,7 +4,7 @@ const load = createLoader({
4
4
  baseUrl: 'https://clerk.com/docs/upgrade-guides/core-2'
5
5
  });
6
6
  const changesAffectingAll = ['organization-getroles-arguments-changed', 'organization-getmemberships-arguments-changed', 'organization-getdomains-arguments-change', 'organization-getinvitations-arguments-changed', 'organization-getmembershiprequests-arguments-changed', 'user-getorganizationinvitations-arguments-changed', 'user-getorganizationsuggestions-arguments-changed', 'user-getorganizationmemberships-arguments-changed', 'user-getorganizationmemberships-return-signature', 'getorganizationinvitationlist-return-signature', 'getorganizationinvitationlist-return-type-change', 'getorganizationmembershiplist-return-type-change', 'getorganizationlist-return-signature', 'getorganizationlist-return-type-change', 'getinvitationlist-return-signature', 'getsessionlist-return-signature', 'getuserlist-return-signature', 'getallowlistidentifierlist-return-signature', 'getclientlist-return-signature', 'getredirecturllist-return-signature', 'getuseroauthaccesstoken-return-signature', 'organization-logourl', 'user-profileimageurl', 'user-update-password'];
7
- const jsChanges = ['setsession', 'organization-create-string', 'organization-getpendinginvitations', 'mfa-dropdown', 'appearance-variables-breaking-changes', 'aftersignxurl-changes', 'supported-external-accounts-type-removed'];
7
+ const jsChanges = ['setsession', 'organization-create-string', 'organization-getpendinginvitations', 'mfa-dropdown', 'appearance-variables-breaking-changes', 'aftersignxurl-changes', 'supported-external-accounts-removed'];
8
8
  const reactChanges = ['magiclinkerrorcode', 'usemagiclink', 'ismagiclinkerror', 'magiclinkerror', 'handlemagiclinkverification', 'clerkprovider-frontendapi-2', 'navigate-to-routerpush-routerreplace', 'afterswitchorganizationurl', 'appearance-organizationpreview-organizationswitcher', 'useorganization-invitationlist', 'useorganization-membershiplist', 'useorganizations', 'userprofile-prop', 'organizationprofile-settings', 'userprofile-security', 'connected-accounts-dropdown', 'userbuttonpopoveractionbuttontext-removed', 'userbuttontrigger-userbuttonbox-invert', 'organizationswitcherpopoveractionbuttontext-removed', 'card-changes', 'alternativemethods-backlink', 'button-to-organizationlistcreateorganizationactionbutton', 'remove-socialbuttonsblockbuttonarrow', 'remove-identitypreview-avatar', 'withsession-removed', 'withclerk-removed', 'withuser-removed-2', 'withclerk-hof-removed', 'withsession-hof-removed', 'withuser-hof-removed', 'multisessionappsupport-import-change', 'clerkprovideroptionswrapper-dropped', 'new-localization-keys', 'removed-localization-keys', 'changed-localization-keys', 'signoutcallback-to-redirecturl', 'min-react-version', 'externalaccount-avatarurl', 'organizationmembershippublicuserdata-profileimageurl'];
9
9
  export default {
10
10
  nextjs: load('nextjs', dedupeMerge(changesAffectingAll, jsChanges, ['api-key-to-secret-key', 'frontend-api-to-publishable-key', 'with-clerk-middleware-removed', 'auth-middleware-deprecated', 'clerk-js-version-next-public', 'authmiddleware-apikey', 'authmiddleware-frontendapi', 'createclerkclient-apikey', 'createclerkclient-frontendapi', 'getauth-apikey', 'clerkprovider-frontendapi-2', 'import-nextjs-app-beta', 'import-nextjs-ssr', 'import-nextjs-edge-middleware', 'import-nextjs-edge-middlewarefiles', 'import-api-url', 'import-api-version', 'import-clerk-js-url', 'import-clerk-js-version', 'import-domain', 'import-is-satellite', 'import-proxy-url', 'import-publishable-key', 'import-secret-key', 'import-sign-in-url', 'import-sign-up-url', 'import-nextjs-api', 'api-url-value-change', 'ismagiclinkerror', 'usemagiclink', 'magiclinkerrorcode', 'organizationprofile-settings', 'userprofile-security', 'connected-accounts-dropdown', 'userbuttonpopoveractionbuttontext-removed', 'userbuttontrigger-userbuttonbox-invert', 'organizationswitcherpopoveractionbuttontext-removed', 'card-changes', 'alternativemethods-backlink', 'button-to-organizationlistcreateorganizationactionbutton', 'remove-socialbuttonsblockbuttonarrow', 'remove-identitypreview-avatar', 'multisessionappsupport-import-change', 'auth-import-change', 'currentuser-import-change', 'authmiddleware-import-change', 'buildclerkprops-import-change', 'verifytoken-import-change', 'verifyjwt-import-change', 'decodejwt-import-change', 'signjwt-import-change', 'constants-import-change', 'createauthenticaterequest-import-change', 'createisomorphicrequest-import-change', 'clerk-import-change', 'isclerkapiresponserror-import-change', 'isemaillinkerror-import-change', 'isknownerror-import-change', 'ismetamaskerror-import-change', 'withsession-removed', 'withclerk-removed', 'withuser-removed-2', 'withclerk-hof-removed', 'withsession-hof-removed', 'withuser-hof-removed', 'next-public-clerk-js-url', 'new-localization-keys', 'removed-localization-keys', 'changed-localization-keys', 'signoutcallback-to-redirecturl', 'min-nextjs-version', 'redirecttosignin-import-path', 'redirecttosignup-import-path', 'externalaccount-avatarurl', 'organizationmembershippublicuserdata-profileimageurl'])),
@@ -6,9 +6,9 @@ matcherFlags: 'm'
6
6
  warning: true
7
7
  ---
8
8
 
9
- The [`authMiddleware`](https://clerk.com/docs/references/nextjs/auth-middleware) API from `@clerk/nextjs` has been marked as deprecated. We highly recommend using [`clerkMiddleware`](https://beta.clerk.com/docs/references/nextjs/clerk-middleware) going forward. `clerkMiddleware` protects no routes by default and you need to add your individual routes you want to opt into protection. Here's an example of having all routes public except for everything under `/dashboard`.
9
+ The [`authMiddleware`](https://clerk.com/docs/references/nextjs/auth-middleware) API from `@clerk/nextjs` has been marked as deprecated. We highly recommend using [`clerkMiddleware`](https://clerk.com/docs/references/nextjs/clerk-middleware) going forward. `clerkMiddleware` protects no routes by default and you need to add your individual routes you want to opt into protection. Here's an example of having all routes public except for everything under `/dashboard`.
10
10
 
11
- For more documentation on the new `clerkMiddleware` function, check out [our official docs](https://beta.clerk.com/docs/references/nextjs/clerk-middleware)!
11
+ For more documentation on the new `clerkMiddleware` function, check out [our official docs](https://clerk.com/docs/references/nextjs/clerk-middleware)!
12
12
 
13
13
  **Before:**
14
14
 
@@ -6,7 +6,7 @@ category: 'top-level-imports'
6
6
  replaceWithString: 'nextjs/server'
7
7
  ---
8
8
 
9
- The `authMiddleware` import path has changed from `@clerk/nextjs` to `@clerk/nextjs/server`, as this is a helper that should be only used on the server side. You must update your import path in order for it to work correctly. Note as well that `authMiddleware` is deprecated as of this release, and we recommend [using `clerkMiddleware` instead](https://beta.clerk.com/docs/references/nextjs/clerk-middleware). Example below of the fix that needs to be made:
9
+ The `authMiddleware` import path has changed from `@clerk/nextjs` to `@clerk/nextjs/server`, as this is a helper that should be only used on the server side. You must update your import path in order for it to work correctly. Note as well that `authMiddleware` is deprecated as of this release, and we recommend [using `clerkMiddleware` instead](https://clerk.com/docs/references/nextjs/clerk-middleware). Example below of the fix that needs to be made:
10
10
 
11
11
  ```diff
12
12
  - import { authMiddleware } from "@clerk/nextjs"
@@ -4,7 +4,7 @@ category: 'middleware'
4
4
  matcher: "withClerkMiddleware\\("
5
5
  ---
6
6
 
7
- `withClerkMiddleware` has been deprecated and is now removed in v5. We recommend moving to `clerkMiddleware` instead. Please read the [clerkMiddleware guide](https://beta.clerk.com/docs/references/nextjs/clerk-middleware) for more details. Here’s an example of how a simple middleware setup might look before and after.
7
+ `withClerkMiddleware` has been deprecated and is now removed in v5. We recommend moving to `clerkMiddleware` instead. Please read the [clerkMiddleware guide](https://clerk.com/docs/references/nextjs/clerk-middleware) for more details. Here’s an example of how a simple middleware setup might look before and after.
8
8
 
9
9
  ```js
10
10
  // Before: using withClerkMiddleware
@@ -1,7 +1,7 @@
1
1
  ---
2
- title: "`createClerkExpressRequireAuth` requires publishable key"
2
+ title: '`createClerkExpressRequireAuth` requires publishable key'
3
+ matcher: 'createClerkExpressRequireAuth'
3
4
  warning: true
4
- matcher: `createClerkExpressRequireAuth`
5
5
  ---
6
6
 
7
7
  The `createClerkExpressRequireAuth` method now requires a clerk public key in order to work correctly. It can be passed in as a parameter directly, or picked up via environment variable. An error will be thrown now if there's no public key provided, this was not previously the case.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: '`createClerkExpressWithAuth` requires publishable key'
3
+ warning: true
4
+ matcher: 'createClerkExpressWithAuth'
5
+ ---
6
+
7
+ The `createClerkExpressWithAuth` method now requires a clerk public key in order to work correctly. It can be passed in as a parameter directly, or picked up via environment variable. An error will be thrown now if there's no public key provided, this was not previously the case.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerk/upgrade",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",